mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e04f316d6434a50d/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058#[cfg_attr(feature = "ts", derive(TS))]
1059#[cfg_attr(feature = "ts", ts(export))]
1060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1062#[cfg_attr(feature = "serde", serde(tag = "type"))]
1063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1064#[repr(u32)]
1065pub enum GsmLinkType {
1066    #[doc = "no service"]
1067    GSM_LINK_TYPE_NONE = 0,
1068    #[doc = "link type unknown"]
1069    GSM_LINK_TYPE_UNKNOWN = 1,
1070    #[doc = "2G (GSM/GRPS/EDGE) link"]
1071    GSM_LINK_TYPE_2G = 2,
1072    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
1073    GSM_LINK_TYPE_3G = 3,
1074    #[doc = "4G link (LTE)"]
1075    GSM_LINK_TYPE_4G = 4,
1076}
1077impl GsmLinkType {
1078    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
1079}
1080impl Default for GsmLinkType {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085#[cfg_attr(feature = "ts", derive(TS))]
1086#[cfg_attr(feature = "ts", ts(export))]
1087#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1089#[cfg_attr(feature = "serde", serde(tag = "type"))]
1090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1091#[repr(u32)]
1092pub enum GsmModemType {
1093    #[doc = "not specified"]
1094    GSM_MODEM_TYPE_UNKNOWN = 0,
1095    #[doc = "HUAWEI LTE USB Stick E3372"]
1096    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
1097}
1098impl GsmModemType {
1099    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
1100}
1101impl Default for GsmModemType {
1102    fn default() -> Self {
1103        Self::DEFAULT
1104    }
1105}
1106bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1107impl HighresImuUpdatedFlags {
1108    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1109}
1110impl Default for HighresImuUpdatedFlags {
1111    fn default() -> Self {
1112        Self::DEFAULT
1113    }
1114}
1115bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1116impl HilActuatorControlsFlags {
1117    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1118}
1119impl Default for HilActuatorControlsFlags {
1120    fn default() -> Self {
1121        Self::DEFAULT
1122    }
1123}
1124bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1125impl HilSensorUpdatedFlags {
1126    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1127}
1128impl Default for HilSensorUpdatedFlags {
1129    fn default() -> Self {
1130        Self::DEFAULT
1131    }
1132}
1133bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1134impl HlFailureFlag {
1135    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1136}
1137impl Default for HlFailureFlag {
1138    fn default() -> Self {
1139        Self::DEFAULT
1140    }
1141}
1142bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1143impl IlluminatorErrorFlags {
1144    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1145}
1146impl Default for IlluminatorErrorFlags {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158#[doc = "Modes of illuminator"]
1159pub enum IlluminatorMode {
1160    #[doc = "Illuminator mode is not specified/unknown"]
1161    ILLUMINATOR_MODE_UNKNOWN = 0,
1162    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1163    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1164    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1165    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1166}
1167impl IlluminatorMode {
1168    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1169}
1170impl Default for IlluminatorMode {
1171    fn default() -> Self {
1172        Self::DEFAULT
1173    }
1174}
1175#[cfg_attr(feature = "ts", derive(TS))]
1176#[cfg_attr(feature = "ts", ts(export))]
1177#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1179#[cfg_attr(feature = "serde", serde(tag = "type"))]
1180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1181#[repr(u32)]
1182#[doc = "Type of landing target"]
1183pub enum LandingTargetType {
1184    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1185    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1186    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1187    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1188    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1189    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1190    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1191    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1192}
1193impl LandingTargetType {
1194    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1195}
1196impl Default for LandingTargetType {
1197    fn default() -> Self {
1198        Self::DEFAULT
1199    }
1200}
1201#[cfg_attr(feature = "ts", derive(TS))]
1202#[cfg_attr(feature = "ts", ts(export))]
1203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1205#[cfg_attr(feature = "serde", serde(tag = "type"))]
1206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1207#[repr(u32)]
1208pub enum MagCalStatus {
1209    MAG_CAL_NOT_STARTED = 0,
1210    MAG_CAL_WAITING_TO_START = 1,
1211    MAG_CAL_RUNNING_STEP_ONE = 2,
1212    MAG_CAL_RUNNING_STEP_TWO = 3,
1213    MAG_CAL_SUCCESS = 4,
1214    MAG_CAL_FAILED = 5,
1215    MAG_CAL_BAD_ORIENTATION = 6,
1216    MAG_CAL_BAD_RADIUS = 7,
1217}
1218impl MagCalStatus {
1219    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1220}
1221impl Default for MagCalStatus {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226#[cfg_attr(feature = "ts", derive(TS))]
1227#[cfg_attr(feature = "ts", ts(export))]
1228#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1230#[cfg_attr(feature = "serde", serde(tag = "type"))]
1231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1232#[repr(u32)]
1233pub enum MavArmAuthDeniedReason {
1234    #[doc = "Not a specific reason"]
1235    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1236    #[doc = "Authorizer will send the error as string to GCS"]
1237    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1238    #[doc = "At least one waypoint have a invalid value"]
1239    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1240    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1241    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1242    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1243    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1244    #[doc = "Weather is not good to fly"]
1245    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1246}
1247impl MavArmAuthDeniedReason {
1248    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1249}
1250impl Default for MavArmAuthDeniedReason {
1251    fn default() -> Self {
1252        Self::DEFAULT
1253    }
1254}
1255#[cfg_attr(feature = "ts", derive(TS))]
1256#[cfg_attr(feature = "ts", ts(export))]
1257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1259#[cfg_attr(feature = "serde", serde(tag = "type"))]
1260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1261#[repr(u32)]
1262#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1263pub enum MavAutopilot {
1264    #[doc = "Generic autopilot, full support for everything"]
1265    MAV_AUTOPILOT_GENERIC = 0,
1266    #[doc = "Reserved for future use."]
1267    MAV_AUTOPILOT_RESERVED = 1,
1268    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1269    MAV_AUTOPILOT_SLUGS = 2,
1270    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1271    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1272    #[doc = "OpenPilot, <http://openpilot.org>"]
1273    MAV_AUTOPILOT_OPENPILOT = 4,
1274    #[doc = "Generic autopilot only supporting simple waypoints"]
1275    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1276    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1277    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1278    #[doc = "Generic autopilot supporting the full mission command set"]
1279    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1280    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1281    MAV_AUTOPILOT_INVALID = 8,
1282    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1283    MAV_AUTOPILOT_PPZ = 9,
1284    #[doc = "UAV Dev Board"]
1285    MAV_AUTOPILOT_UDB = 10,
1286    #[doc = "FlexiPilot"]
1287    MAV_AUTOPILOT_FP = 11,
1288    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1289    MAV_AUTOPILOT_PX4 = 12,
1290    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1291    MAV_AUTOPILOT_SMACCMPILOT = 13,
1292    #[doc = "AutoQuad -- <http://autoquad.org>"]
1293    MAV_AUTOPILOT_AUTOQUAD = 14,
1294    #[doc = "Armazila -- <http://armazila.com>"]
1295    MAV_AUTOPILOT_ARMAZILA = 15,
1296    #[doc = "Aerob -- <http://aerob.ru>"]
1297    MAV_AUTOPILOT_AEROB = 16,
1298    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1299    MAV_AUTOPILOT_ASLUAV = 17,
1300    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1301    MAV_AUTOPILOT_SMARTAP = 18,
1302    #[doc = "AirRails - <http://uaventure.com>"]
1303    MAV_AUTOPILOT_AIRRAILS = 19,
1304    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1305    MAV_AUTOPILOT_REFLEX = 20,
1306}
1307impl MavAutopilot {
1308    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1309}
1310impl Default for MavAutopilot {
1311    fn default() -> Self {
1312        Self::DEFAULT
1313    }
1314}
1315#[cfg_attr(feature = "ts", derive(TS))]
1316#[cfg_attr(feature = "ts", ts(export))]
1317#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1319#[cfg_attr(feature = "serde", serde(tag = "type"))]
1320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1321#[repr(u32)]
1322#[doc = "Enumeration for battery charge states."]
1323pub enum MavBatteryChargeState {
1324    #[doc = "Low battery state is not provided"]
1325    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1326    #[doc = "Battery is not in low state. Normal operation."]
1327    MAV_BATTERY_CHARGE_STATE_OK = 1,
1328    #[doc = "Battery state is low, warn and monitor close."]
1329    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1330    #[doc = "Battery state is critical, return or abort immediately."]
1331    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1332    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1333    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1334    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1335    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1336    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1337    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1338    #[doc = "Battery is charging."]
1339    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1340}
1341impl MavBatteryChargeState {
1342    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1343}
1344impl Default for MavBatteryChargeState {
1345    fn default() -> Self {
1346        Self::DEFAULT
1347    }
1348}
1349bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1350impl MavBatteryFault {
1351    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1352}
1353impl Default for MavBatteryFault {
1354    fn default() -> Self {
1355        Self::DEFAULT
1356    }
1357}
1358#[cfg_attr(feature = "ts", derive(TS))]
1359#[cfg_attr(feature = "ts", ts(export))]
1360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1362#[cfg_attr(feature = "serde", serde(tag = "type"))]
1363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1364#[repr(u32)]
1365#[doc = "Enumeration of battery functions"]
1366pub enum MavBatteryFunction {
1367    #[doc = "Battery function is unknown"]
1368    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1369    #[doc = "Battery supports all flight systems"]
1370    MAV_BATTERY_FUNCTION_ALL = 1,
1371    #[doc = "Battery for the propulsion system"]
1372    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1373    #[doc = "Avionics battery"]
1374    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1375    #[doc = "Payload battery"]
1376    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1377}
1378impl MavBatteryFunction {
1379    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1380}
1381impl Default for MavBatteryFunction {
1382    fn default() -> Self {
1383        Self::DEFAULT
1384    }
1385}
1386#[cfg_attr(feature = "ts", derive(TS))]
1387#[cfg_attr(feature = "ts", ts(export))]
1388#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1390#[cfg_attr(feature = "serde", serde(tag = "type"))]
1391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1392#[repr(u32)]
1393#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1394pub enum MavBatteryMode {
1395    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1396    MAV_BATTERY_MODE_UNKNOWN = 0,
1397    #[doc = "Battery is auto discharging (towards storage level)."]
1398    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1399    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1400    MAV_BATTERY_MODE_HOT_SWAP = 2,
1401}
1402impl MavBatteryMode {
1403    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1404}
1405impl Default for MavBatteryMode {
1406    fn default() -> Self {
1407        Self::DEFAULT
1408    }
1409}
1410#[cfg_attr(feature = "ts", derive(TS))]
1411#[cfg_attr(feature = "ts", ts(export))]
1412#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1414#[cfg_attr(feature = "serde", serde(tag = "type"))]
1415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1416#[repr(u32)]
1417#[doc = "Enumeration of battery types"]
1418pub enum MavBatteryType {
1419    #[doc = "Not specified."]
1420    MAV_BATTERY_TYPE_UNKNOWN = 0,
1421    #[doc = "Lithium polymer battery"]
1422    MAV_BATTERY_TYPE_LIPO = 1,
1423    #[doc = "Lithium-iron-phosphate battery"]
1424    MAV_BATTERY_TYPE_LIFE = 2,
1425    #[doc = "Lithium-ION battery"]
1426    MAV_BATTERY_TYPE_LION = 3,
1427    #[doc = "Nickel metal hydride battery"]
1428    MAV_BATTERY_TYPE_NIMH = 4,
1429}
1430impl MavBatteryType {
1431    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1432}
1433impl Default for MavBatteryType {
1434    fn default() -> Self {
1435        Self::DEFAULT
1436    }
1437}
1438#[cfg_attr(feature = "ts", derive(TS))]
1439#[cfg_attr(feature = "ts", ts(export))]
1440#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1442#[cfg_attr(feature = "serde", serde(tag = "type"))]
1443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1444#[repr(u32)]
1445#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1446pub enum MavCmd {
1447    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1448    MAV_CMD_NAV_WAYPOINT = 16,
1449    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1450    MAV_CMD_NAV_LOITER_UNLIM = 17,
1451    #[doc = "Loiter around this waypoint for X turns"]
1452    MAV_CMD_NAV_LOITER_TURNS = 18,
1453    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1454    MAV_CMD_NAV_LOITER_TIME = 19,
1455    #[doc = "Return to launch location"]
1456    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1457    #[doc = "Land at location."]
1458    MAV_CMD_NAV_LAND = 21,
1459    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1460    MAV_CMD_NAV_TAKEOFF = 22,
1461    #[doc = "Land at local position (local frame only)"]
1462    MAV_CMD_NAV_LAND_LOCAL = 23,
1463    #[doc = "Takeoff from local position (local frame only)"]
1464    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1465    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1466    MAV_CMD_NAV_FOLLOW = 25,
1467    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1468    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1469    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1470    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1471    #[doc = "Begin following a target"]
1472    MAV_CMD_DO_FOLLOW = 32,
1473    #[doc = "Reposition the MAV after a follow target command has been sent"]
1474    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1475    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1476    MAV_CMD_DO_ORBIT = 34,
1477    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1478    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1479    MAV_CMD_NAV_ROI = 80,
1480    #[doc = "Control autonomous path planning on the MAV."]
1481    MAV_CMD_NAV_PATHPLANNING = 81,
1482    #[doc = "Navigate to waypoint using a spline path."]
1483    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1484    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1485    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1486    #[doc = "Land using VTOL mode"]
1487    MAV_CMD_NAV_VTOL_LAND = 85,
1488    #[doc = "hand control over to an external controller"]
1489    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1490    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1491    MAV_CMD_NAV_DELAY = 93,
1492    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1493    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1494    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1495    MAV_CMD_NAV_LAST = 95,
1496    #[doc = "Delay mission state machine."]
1497    MAV_CMD_CONDITION_DELAY = 112,
1498    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1499    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1500    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1501    MAV_CMD_CONDITION_DISTANCE = 114,
1502    #[doc = "Reach a certain target angle."]
1503    MAV_CMD_CONDITION_YAW = 115,
1504    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1505    MAV_CMD_CONDITION_LAST = 159,
1506    #[doc = "Set system mode."]
1507    MAV_CMD_DO_SET_MODE = 176,
1508    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1509    MAV_CMD_DO_JUMP = 177,
1510    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1511    MAV_CMD_DO_CHANGE_SPEED = 178,
1512    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1513    MAV_CMD_DO_SET_HOME = 179,
1514    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1515    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1516    MAV_CMD_DO_SET_PARAMETER = 180,
1517    #[doc = "Set a relay to a condition."]
1518    MAV_CMD_DO_SET_RELAY = 181,
1519    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1520    MAV_CMD_DO_REPEAT_RELAY = 182,
1521    #[doc = "Set a servo to a desired PWM value."]
1522    MAV_CMD_DO_SET_SERVO = 183,
1523    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1524    MAV_CMD_DO_REPEAT_SERVO = 184,
1525    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1526    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1527    #[doc = "Change altitude set point."]
1528    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1529    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1530    MAV_CMD_DO_SET_ACTUATOR = 187,
1531    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1532    MAV_CMD_DO_RETURN_PATH_START = 188,
1533    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1534    MAV_CMD_DO_LAND_START = 189,
1535    #[doc = "Mission command to perform a landing from a rally point."]
1536    MAV_CMD_DO_RALLY_LAND = 190,
1537    #[doc = "Mission command to safely abort an autonomous landing."]
1538    MAV_CMD_DO_GO_AROUND = 191,
1539    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1540    MAV_CMD_DO_REPOSITION = 192,
1541    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1542    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1543    #[doc = "Set moving direction to forward or reverse."]
1544    MAV_CMD_DO_SET_REVERSE = 194,
1545    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1546    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1547    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1548    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1549    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1550    MAV_CMD_DO_SET_ROI_NONE = 197,
1551    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1552    MAV_CMD_DO_SET_ROI_SYSID = 198,
1553    #[doc = "Control onboard camera system."]
1554    MAV_CMD_DO_CONTROL_VIDEO = 200,
1555    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1556    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1557    MAV_CMD_DO_SET_ROI = 201,
1558    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1559    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1560    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1561    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1562    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1563    #[doc = "Mission command to configure a camera or antenna mount"]
1564    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1565    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1566    #[doc = "Mission command to control a camera or antenna mount"]
1567    MAV_CMD_DO_MOUNT_CONTROL = 205,
1568    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1569    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1570    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1571    MAV_CMD_DO_FENCE_ENABLE = 207,
1572    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1573    MAV_CMD_DO_PARACHUTE = 208,
1574    #[doc = "Command to perform motor test."]
1575    MAV_CMD_DO_MOTOR_TEST = 209,
1576    #[doc = "Change to/from inverted flight."]
1577    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1578    #[doc = "Mission command to operate a gripper."]
1579    MAV_CMD_DO_GRIPPER = 211,
1580    #[doc = "Enable/disable autotune."]
1581    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1582    #[doc = "Sets a desired vehicle turn angle and speed change."]
1583    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1584    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1585    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1586    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1587    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1588    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1589    #[doc = "set id of master controller"]
1590    MAV_CMD_DO_GUIDED_MASTER = 221,
1591    #[doc = "Set limits for external control"]
1592    MAV_CMD_DO_GUIDED_LIMITS = 222,
1593    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1594    MAV_CMD_DO_ENGINE_CONTROL = 223,
1595    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1596    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1597    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1598    MAV_CMD_DO_LAST = 240,
1599    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1600    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1601    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1602    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1603    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1604    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1605    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1606    MAV_CMD_PREFLIGHT_STORAGE = 245,
1607    #[doc = "Request the reboot or shutdown of system components."]
1608    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1609    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1610    MAV_CMD_OVERRIDE_GOTO = 252,
1611    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1612    MAV_CMD_OBLIQUE_SURVEY = 260,
1613    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1614    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1615    #[doc = "start running a mission"]
1616    MAV_CMD_MISSION_START = 300,
1617    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1618    MAV_CMD_ACTUATOR_TEST = 310,
1619    #[doc = "Actuator configuration command."]
1620    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1621    #[doc = "Arms / Disarms a component"]
1622    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1623    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1624    MAV_CMD_RUN_PREARM_CHECKS = 401,
1625    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1626    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1627    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1628    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1629    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1630    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1631    MAV_CMD_GET_HOME_POSITION = 410,
1632    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1633    MAV_CMD_INJECT_FAILURE = 420,
1634    #[doc = "Starts receiver pairing."]
1635    MAV_CMD_START_RX_PAIR = 500,
1636    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1637    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1638    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1639    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1640    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1641    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1642    MAV_CMD_REQUEST_MESSAGE = 512,
1643    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1644    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1645    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1646    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1647    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1648    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1649    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1650    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1651    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1652    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1653    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1654    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1655    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1656    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1657    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1658    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1659    MAV_CMD_STORAGE_FORMAT = 526,
1660    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1661    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1662    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1663    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1664    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1665    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1666    #[doc = "Reset all camera settings to Factory Default"]
1667    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1668    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1669    MAV_CMD_SET_CAMERA_MODE = 530,
1670    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1671    MAV_CMD_SET_CAMERA_ZOOM = 531,
1672    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1673    MAV_CMD_SET_CAMERA_FOCUS = 532,
1674    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1675    MAV_CMD_SET_STORAGE_USAGE = 533,
1676    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1677    MAV_CMD_SET_CAMERA_SOURCE = 534,
1678    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1679    MAV_CMD_JUMP_TAG = 600,
1680    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1681    MAV_CMD_DO_JUMP_TAG = 601,
1682    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1683    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1684    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1685    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1686    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1687    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1688    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1689    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1690    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1691    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1692    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1693    #[doc = "Enable or disable on-board camera triggering system."]
1694    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1695    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1696    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1697    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1698    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1699    #[doc = "Stops ongoing tracking."]
1700    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1701    #[doc = "Starts video capture (recording)."]
1702    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1703    #[doc = "Stop the current video capture (recording)."]
1704    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1705    #[doc = "Start video streaming"]
1706    MAV_CMD_VIDEO_START_STREAMING = 2502,
1707    #[doc = "Stop the given video stream"]
1708    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1709    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1710    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1711    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1712    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1713    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1714    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1715    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1716    MAV_CMD_LOGGING_START = 2510,
1717    #[doc = "Request to stop streaming log data over MAVLink"]
1718    MAV_CMD_LOGGING_STOP = 2511,
1719    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1720    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1721    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1722    #[doc = "Create a panorama at the current position"]
1723    MAV_CMD_PANORAMA_CREATE = 2800,
1724    #[doc = "Request VTOL transition"]
1725    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1726    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1727    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1728    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1729    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1730    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1731    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1732    #[doc = "Delay mission state machine until gate has been reached."]
1733    MAV_CMD_CONDITION_GATE = 4501,
1734    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1735    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1736    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1737    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1738    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1739    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1740    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1741    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1742    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1743    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1744    #[doc = "Rally point. You can have multiple rally points defined."]
1745    MAV_CMD_NAV_RALLY_POINT = 5100,
1746    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1747    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1748    #[doc = "Change state of safety switch."]
1749    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1750    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1751    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1752    #[deprecated = "  (Deprecated since 2021-06)"]
1753    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1754    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1755    #[deprecated = "  (Deprecated since 2021-06)"]
1756    #[doc = "Control the payload deployment."]
1757    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1758    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1759    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1760    #[doc = "Command to operate winch."]
1761    MAV_CMD_DO_WINCH = 42600,
1762    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1763    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1764    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1765    MAV_CMD_WAYPOINT_USER_1 = 31000,
1766    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1767    MAV_CMD_WAYPOINT_USER_2 = 31001,
1768    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1769    MAV_CMD_WAYPOINT_USER_3 = 31002,
1770    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1771    MAV_CMD_WAYPOINT_USER_4 = 31003,
1772    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1773    MAV_CMD_WAYPOINT_USER_5 = 31004,
1774    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1775    MAV_CMD_SPATIAL_USER_1 = 31005,
1776    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1777    MAV_CMD_SPATIAL_USER_2 = 31006,
1778    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1779    MAV_CMD_SPATIAL_USER_3 = 31007,
1780    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1781    MAV_CMD_SPATIAL_USER_4 = 31008,
1782    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1783    MAV_CMD_SPATIAL_USER_5 = 31009,
1784    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1785    MAV_CMD_USER_1 = 31010,
1786    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1787    MAV_CMD_USER_2 = 31011,
1788    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1789    MAV_CMD_USER_3 = 31012,
1790    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1791    MAV_CMD_USER_4 = 31013,
1792    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1793    MAV_CMD_USER_5 = 31014,
1794    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1795    MAV_CMD_CAN_FORWARD = 32000,
1796    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
1797    MAV_CMD_RESET_MPPT = 40001,
1798    #[doc = "Mission command to perform a power cycle on payload"]
1799    MAV_CMD_PAYLOAD_CONTROL = 40002,
1800}
1801impl MavCmd {
1802    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1803}
1804impl Default for MavCmd {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Possible actions an aircraft can take to avoid a collision."]
1817pub enum MavCollisionAction {
1818    #[doc = "Ignore any potential collisions"]
1819    MAV_COLLISION_ACTION_NONE = 0,
1820    #[doc = "Report potential collision"]
1821    MAV_COLLISION_ACTION_REPORT = 1,
1822    #[doc = "Ascend or Descend to avoid threat"]
1823    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1824    #[doc = "Move horizontally to avoid threat"]
1825    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1826    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1827    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1828    #[doc = "Aircraft to fly directly back to its launch point"]
1829    MAV_COLLISION_ACTION_RTL = 5,
1830    #[doc = "Aircraft to stop in place"]
1831    MAV_COLLISION_ACTION_HOVER = 6,
1832}
1833impl MavCollisionAction {
1834    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1835}
1836impl Default for MavCollisionAction {
1837    fn default() -> Self {
1838        Self::DEFAULT
1839    }
1840}
1841#[cfg_attr(feature = "ts", derive(TS))]
1842#[cfg_attr(feature = "ts", ts(export))]
1843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1845#[cfg_attr(feature = "serde", serde(tag = "type"))]
1846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1847#[repr(u32)]
1848#[doc = "Source of information about this collision."]
1849pub enum MavCollisionSrc {
1850    #[doc = "ID field references ADSB_VEHICLE packets"]
1851    MAV_COLLISION_SRC_ADSB = 0,
1852    #[doc = "ID field references MAVLink SRC ID"]
1853    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1854}
1855impl MavCollisionSrc {
1856    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1857}
1858impl Default for MavCollisionSrc {
1859    fn default() -> Self {
1860        Self::DEFAULT
1861    }
1862}
1863#[cfg_attr(feature = "ts", derive(TS))]
1864#[cfg_attr(feature = "ts", ts(export))]
1865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1867#[cfg_attr(feature = "serde", serde(tag = "type"))]
1868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1869#[repr(u32)]
1870#[doc = "Aircraft-rated danger from this threat."]
1871pub enum MavCollisionThreatLevel {
1872    #[doc = "Not a threat"]
1873    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1874    #[doc = "Craft is mildly concerned about this threat"]
1875    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1876    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1877    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1878}
1879impl MavCollisionThreatLevel {
1880    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1881}
1882impl Default for MavCollisionThreatLevel {
1883    fn default() -> Self {
1884        Self::DEFAULT
1885    }
1886}
1887#[cfg_attr(feature = "ts", derive(TS))]
1888#[cfg_attr(feature = "ts", ts(export))]
1889#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1891#[cfg_attr(feature = "serde", serde(tag = "type"))]
1892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1893#[repr(u32)]
1894#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1895pub enum MavComponent {
1896    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1897    MAV_COMP_ID_ALL = 0,
1898    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1899    MAV_COMP_ID_AUTOPILOT1 = 1,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER1 = 25,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER2 = 26,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER3 = 27,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER4 = 28,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER5 = 29,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER6 = 30,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER7 = 31,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER8 = 32,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER9 = 33,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER10 = 34,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER11 = 35,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER12 = 36,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER13 = 37,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER14 = 38,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER15 = 39,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER16 = 40,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER17 = 41,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER18 = 42,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER19 = 43,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER20 = 44,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER21 = 45,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER22 = 46,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER23 = 47,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER24 = 48,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER25 = 49,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER26 = 50,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER27 = 51,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER28 = 52,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER29 = 53,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER30 = 54,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER31 = 55,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER32 = 56,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER33 = 57,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER34 = 58,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER35 = 59,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER36 = 60,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER37 = 61,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER38 = 62,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER39 = 63,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER40 = 64,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER41 = 65,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER42 = 66,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER43 = 67,
1986    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1987    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER45 = 69,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER46 = 70,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER47 = 71,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER48 = 72,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER49 = 73,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER50 = 74,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER51 = 75,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER52 = 76,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER53 = 77,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER54 = 78,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER55 = 79,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER56 = 80,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER57 = 81,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER58 = 82,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER59 = 83,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER60 = 84,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER61 = 85,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER62 = 86,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER63 = 87,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER64 = 88,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER65 = 89,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER66 = 90,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER67 = 91,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER68 = 92,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER69 = 93,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER70 = 94,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER71 = 95,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER72 = 96,
2044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2045    MAV_COMP_ID_USER73 = 97,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER74 = 98,
2048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2049    MAV_COMP_ID_USER75 = 99,
2050    #[doc = "Camera #1."]
2051    MAV_COMP_ID_CAMERA = 100,
2052    #[doc = "Camera #2."]
2053    MAV_COMP_ID_CAMERA2 = 101,
2054    #[doc = "Camera #3."]
2055    MAV_COMP_ID_CAMERA3 = 102,
2056    #[doc = "Camera #4."]
2057    MAV_COMP_ID_CAMERA4 = 103,
2058    #[doc = "Camera #5."]
2059    MAV_COMP_ID_CAMERA5 = 104,
2060    #[doc = "Camera #6."]
2061    MAV_COMP_ID_CAMERA6 = 105,
2062    #[doc = "Servo #1."]
2063    MAV_COMP_ID_SERVO1 = 140,
2064    #[doc = "Servo #2."]
2065    MAV_COMP_ID_SERVO2 = 141,
2066    #[doc = "Servo #3."]
2067    MAV_COMP_ID_SERVO3 = 142,
2068    #[doc = "Servo #4."]
2069    MAV_COMP_ID_SERVO4 = 143,
2070    #[doc = "Servo #5."]
2071    MAV_COMP_ID_SERVO5 = 144,
2072    #[doc = "Servo #6."]
2073    MAV_COMP_ID_SERVO6 = 145,
2074    #[doc = "Servo #7."]
2075    MAV_COMP_ID_SERVO7 = 146,
2076    #[doc = "Servo #8."]
2077    MAV_COMP_ID_SERVO8 = 147,
2078    #[doc = "Servo #9."]
2079    MAV_COMP_ID_SERVO9 = 148,
2080    #[doc = "Servo #10."]
2081    MAV_COMP_ID_SERVO10 = 149,
2082    #[doc = "Servo #11."]
2083    MAV_COMP_ID_SERVO11 = 150,
2084    #[doc = "Servo #12."]
2085    MAV_COMP_ID_SERVO12 = 151,
2086    #[doc = "Servo #13."]
2087    MAV_COMP_ID_SERVO13 = 152,
2088    #[doc = "Servo #14."]
2089    MAV_COMP_ID_SERVO14 = 153,
2090    #[doc = "Gimbal #1."]
2091    MAV_COMP_ID_GIMBAL = 154,
2092    #[doc = "Logging component."]
2093    MAV_COMP_ID_LOG = 155,
2094    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2095    MAV_COMP_ID_ADSB = 156,
2096    #[doc = "On Screen Display (OSD) devices for video links."]
2097    MAV_COMP_ID_OSD = 157,
2098    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2099    MAV_COMP_ID_PERIPHERAL = 158,
2100    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2101    #[doc = "Gimbal ID for QX1."]
2102    MAV_COMP_ID_QX1_GIMBAL = 159,
2103    #[doc = "FLARM collision alert component."]
2104    MAV_COMP_ID_FLARM = 160,
2105    #[doc = "Parachute component."]
2106    MAV_COMP_ID_PARACHUTE = 161,
2107    #[doc = "Winch component."]
2108    MAV_COMP_ID_WINCH = 169,
2109    #[doc = "Gimbal #2."]
2110    MAV_COMP_ID_GIMBAL2 = 171,
2111    #[doc = "Gimbal #3."]
2112    MAV_COMP_ID_GIMBAL3 = 172,
2113    #[doc = "Gimbal #4"]
2114    MAV_COMP_ID_GIMBAL4 = 173,
2115    #[doc = "Gimbal #5."]
2116    MAV_COMP_ID_GIMBAL5 = 174,
2117    #[doc = "Gimbal #6."]
2118    MAV_COMP_ID_GIMBAL6 = 175,
2119    #[doc = "Battery #1."]
2120    MAV_COMP_ID_BATTERY = 180,
2121    #[doc = "Battery #2."]
2122    MAV_COMP_ID_BATTERY2 = 181,
2123    #[doc = "CAN over MAVLink client."]
2124    MAV_COMP_ID_MAVCAN = 189,
2125    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2126    MAV_COMP_ID_MISSIONPLANNER = 190,
2127    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2128    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2129    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2130    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2131    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2132    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2133    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2134    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2135    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2136    MAV_COMP_ID_PATHPLANNER = 195,
2137    #[doc = "Component that plans a collision free path between two points."]
2138    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2139    #[doc = "Component that provides position estimates using VIO techniques."]
2140    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2141    #[doc = "Component that manages pairing of vehicle and GCS."]
2142    MAV_COMP_ID_PAIRING_MANAGER = 198,
2143    #[doc = "Inertial Measurement Unit (IMU) #1."]
2144    MAV_COMP_ID_IMU = 200,
2145    #[doc = "Inertial Measurement Unit (IMU) #2."]
2146    MAV_COMP_ID_IMU_2 = 201,
2147    #[doc = "Inertial Measurement Unit (IMU) #3."]
2148    MAV_COMP_ID_IMU_3 = 202,
2149    #[doc = "GPS #1."]
2150    MAV_COMP_ID_GPS = 220,
2151    #[doc = "GPS #2."]
2152    MAV_COMP_ID_GPS2 = 221,
2153    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2154    MAV_COMP_ID_ODID_TXRX_1 = 236,
2155    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2156    MAV_COMP_ID_ODID_TXRX_2 = 237,
2157    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2158    MAV_COMP_ID_ODID_TXRX_3 = 238,
2159    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2160    MAV_COMP_ID_UDP_BRIDGE = 240,
2161    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2162    MAV_COMP_ID_UART_BRIDGE = 241,
2163    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2164    MAV_COMP_ID_TUNNEL_NODE = 242,
2165    #[doc = "Illuminator"]
2166    MAV_COMP_ID_ILLUMINATOR = 243,
2167    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2168    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2169    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2170}
2171impl MavComponent {
2172    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2173}
2174impl Default for MavComponent {
2175    fn default() -> Self {
2176        Self::DEFAULT
2177    }
2178}
2179#[cfg_attr(feature = "ts", derive(TS))]
2180#[cfg_attr(feature = "ts", ts(export))]
2181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2183#[cfg_attr(feature = "serde", serde(tag = "type"))]
2184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2185#[repr(u32)]
2186#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2187#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2188pub enum MavDataStream {
2189    #[doc = "Enable all data streams"]
2190    MAV_DATA_STREAM_ALL = 0,
2191    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2192    MAV_DATA_STREAM_RAW_SENSORS = 1,
2193    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2194    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2195    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2196    MAV_DATA_STREAM_RC_CHANNELS = 3,
2197    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2198    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2199    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2200    MAV_DATA_STREAM_POSITION = 6,
2201    #[doc = "Dependent on the autopilot"]
2202    MAV_DATA_STREAM_EXTRA1 = 10,
2203    #[doc = "Dependent on the autopilot"]
2204    MAV_DATA_STREAM_EXTRA2 = 11,
2205    #[doc = "Dependent on the autopilot"]
2206    MAV_DATA_STREAM_EXTRA3 = 12,
2207}
2208impl MavDataStream {
2209    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2210}
2211impl Default for MavDataStream {
2212    fn default() -> Self {
2213        Self::DEFAULT
2214    }
2215}
2216#[cfg_attr(feature = "ts", derive(TS))]
2217#[cfg_attr(feature = "ts", ts(export))]
2218#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2220#[cfg_attr(feature = "serde", serde(tag = "type"))]
2221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2222#[repr(u32)]
2223#[doc = "Enumeration of distance sensor types"]
2224pub enum MavDistanceSensor {
2225    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2226    MAV_DISTANCE_SENSOR_LASER = 0,
2227    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2228    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2229    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2230    MAV_DISTANCE_SENSOR_INFRARED = 2,
2231    #[doc = "Radar type, e.g. uLanding units"]
2232    MAV_DISTANCE_SENSOR_RADAR = 3,
2233    #[doc = "Broken or unknown type, e.g. analog units"]
2234    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2235}
2236impl MavDistanceSensor {
2237    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2238}
2239impl Default for MavDistanceSensor {
2240    fn default() -> Self {
2241        Self::DEFAULT
2242    }
2243}
2244#[cfg_attr(feature = "ts", derive(TS))]
2245#[cfg_attr(feature = "ts", ts(export))]
2246#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2248#[cfg_attr(feature = "serde", serde(tag = "type"))]
2249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2250#[repr(u32)]
2251#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2252pub enum MavDoRepositionFlags {
2253    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2254    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2255}
2256impl MavDoRepositionFlags {
2257    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2258}
2259impl Default for MavDoRepositionFlags {
2260    fn default() -> Self {
2261        Self::DEFAULT
2262    }
2263}
2264#[cfg_attr(feature = "ts", derive(TS))]
2265#[cfg_attr(feature = "ts", ts(export))]
2266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2268#[cfg_attr(feature = "serde", serde(tag = "type"))]
2269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2270#[repr(u32)]
2271#[doc = "Enumeration of estimator types"]
2272pub enum MavEstimatorType {
2273    #[doc = "Unknown type of the estimator."]
2274    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2275    #[doc = "This is a naive estimator without any real covariance feedback."]
2276    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2277    #[doc = "Computer vision based estimate. Might be up to scale."]
2278    MAV_ESTIMATOR_TYPE_VISION = 2,
2279    #[doc = "Visual-inertial estimate."]
2280    MAV_ESTIMATOR_TYPE_VIO = 3,
2281    #[doc = "Plain GPS estimate."]
2282    MAV_ESTIMATOR_TYPE_GPS = 4,
2283    #[doc = "Estimator integrating GPS and inertial sensing."]
2284    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2285    #[doc = "Estimate from external motion capturing system."]
2286    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2287    #[doc = "Estimator based on lidar sensor input."]
2288    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2289    #[doc = "Estimator on autopilot."]
2290    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2291}
2292impl MavEstimatorType {
2293    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2294}
2295impl Default for MavEstimatorType {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[cfg_attr(feature = "ts", derive(TS))]
2301#[cfg_attr(feature = "ts", ts(export))]
2302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2304#[cfg_attr(feature = "serde", serde(tag = "type"))]
2305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2306#[repr(u32)]
2307#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2308pub enum MavEventCurrentSequenceFlags {
2309    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2310    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2311}
2312impl MavEventCurrentSequenceFlags {
2313    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2314}
2315impl Default for MavEventCurrentSequenceFlags {
2316    fn default() -> Self {
2317        Self::DEFAULT
2318    }
2319}
2320#[cfg_attr(feature = "ts", derive(TS))]
2321#[cfg_attr(feature = "ts", ts(export))]
2322#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2324#[cfg_attr(feature = "serde", serde(tag = "type"))]
2325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2326#[repr(u32)]
2327#[doc = "Reason for an event error response."]
2328pub enum MavEventErrorReason {
2329    #[doc = "The requested event is not available (anymore)."]
2330    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2331}
2332impl MavEventErrorReason {
2333    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2334}
2335impl Default for MavEventErrorReason {
2336    fn default() -> Self {
2337        Self::DEFAULT
2338    }
2339}
2340#[cfg_attr(feature = "ts", derive(TS))]
2341#[cfg_attr(feature = "ts", ts(export))]
2342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2344#[cfg_attr(feature = "serde", serde(tag = "type"))]
2345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2346#[repr(u32)]
2347#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2348pub enum MavFrame {
2349    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2350    MAV_FRAME_GLOBAL = 0,
2351    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2352    MAV_FRAME_LOCAL_NED = 1,
2353    #[doc = "NOT a coordinate frame, indicates a mission command."]
2354    MAV_FRAME_MISSION = 2,
2355    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2356    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2357    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2358    MAV_FRAME_LOCAL_ENU = 4,
2359    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2360    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2361    MAV_FRAME_GLOBAL_INT = 5,
2362    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2363    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2364    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2365    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2366    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2367    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2368    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2369    MAV_FRAME_BODY_NED = 8,
2370    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2371    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2372    MAV_FRAME_BODY_OFFSET_NED = 9,
2373    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2374    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2375    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2376    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2377    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2378    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2379    MAV_FRAME_BODY_FRD = 12,
2380    #[deprecated = "  (Deprecated since 2019-04)"]
2381    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2382    MAV_FRAME_RESERVED_13 = 13,
2383    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2384    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2385    MAV_FRAME_RESERVED_14 = 14,
2386    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2387    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2388    MAV_FRAME_RESERVED_15 = 15,
2389    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2390    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2391    MAV_FRAME_RESERVED_16 = 16,
2392    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2393    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2394    MAV_FRAME_RESERVED_17 = 17,
2395    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2396    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2397    MAV_FRAME_RESERVED_18 = 18,
2398    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2399    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2400    MAV_FRAME_RESERVED_19 = 19,
2401    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2402    MAV_FRAME_LOCAL_FRD = 20,
2403    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2404    MAV_FRAME_LOCAL_FLU = 21,
2405}
2406impl MavFrame {
2407    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2408}
2409impl Default for MavFrame {
2410    fn default() -> Self {
2411        Self::DEFAULT
2412    }
2413}
2414#[cfg_attr(feature = "ts", derive(TS))]
2415#[cfg_attr(feature = "ts", ts(export))]
2416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2418#[cfg_attr(feature = "serde", serde(tag = "type"))]
2419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2420#[repr(u32)]
2421#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2422pub enum MavFtpErr {
2423    #[doc = "None: No error"]
2424    MAV_FTP_ERR_NONE = 0,
2425    #[doc = "Fail: Unknown failure"]
2426    MAV_FTP_ERR_FAIL = 1,
2427    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2428    MAV_FTP_ERR_FAILERRNO = 2,
2429    #[doc = "InvalidDataSize: Payload size is invalid"]
2430    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2431    #[doc = "InvalidSession: Session is not currently open"]
2432    MAV_FTP_ERR_INVALIDSESSION = 4,
2433    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2434    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2435    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2436    MAV_FTP_ERR_EOF = 6,
2437    #[doc = "UnknownCommand: Unknown command / opcode"]
2438    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2439    #[doc = "FileExists: File/directory already exists"]
2440    MAV_FTP_ERR_FILEEXISTS = 8,
2441    #[doc = "FileProtected: File/directory is write protected"]
2442    MAV_FTP_ERR_FILEPROTECTED = 9,
2443    #[doc = "FileNotFound: File/directory not found"]
2444    MAV_FTP_ERR_FILENOTFOUND = 10,
2445}
2446impl MavFtpErr {
2447    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2448}
2449impl Default for MavFtpErr {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2462pub enum MavFtpOpcode {
2463    #[doc = "None. Ignored, always ACKed"]
2464    MAV_FTP_OPCODE_NONE = 0,
2465    #[doc = "TerminateSession: Terminates open Read session"]
2466    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2467    #[doc = "ResetSessions: Terminates all open read sessions"]
2468    MAV_FTP_OPCODE_RESETSESSION = 2,
2469    #[doc = "ListDirectory. List files and directories in path from offset"]
2470    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2471    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2472    MAV_FTP_OPCODE_OPENFILERO = 4,
2473    #[doc = "ReadFile: Reads size bytes from offset in session"]
2474    MAV_FTP_OPCODE_READFILE = 5,
2475    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2476    MAV_FTP_OPCODE_CREATEFILE = 6,
2477    #[doc = "WriteFile: Writes size bytes to offset in session"]
2478    MAV_FTP_OPCODE_WRITEFILE = 7,
2479    #[doc = "RemoveFile: Remove file at path"]
2480    MAV_FTP_OPCODE_REMOVEFILE = 8,
2481    #[doc = "CreateDirectory: Creates directory at path"]
2482    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2483    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2484    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2485    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2486    MAV_FTP_OPCODE_OPENFILEWO = 11,
2487    #[doc = "TruncateFile: Truncate file at path to offset length"]
2488    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2489    #[doc = "Rename: Rename path1 to path2"]
2490    MAV_FTP_OPCODE_RENAME = 13,
2491    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2492    MAV_FTP_OPCODE_CALCFILECRC = 14,
2493    #[doc = "BurstReadFile: Burst download session file"]
2494    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2495    #[doc = "ACK: ACK response"]
2496    MAV_FTP_OPCODE_ACK = 128,
2497    #[doc = "NAK: NAK response"]
2498    MAV_FTP_OPCODE_NAK = 129,
2499}
2500impl MavFtpOpcode {
2501    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2502}
2503impl Default for MavFtpOpcode {
2504    fn default() -> Self {
2505        Self::DEFAULT
2506    }
2507}
2508#[cfg_attr(feature = "ts", derive(TS))]
2509#[cfg_attr(feature = "ts", ts(export))]
2510#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2511#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2512#[cfg_attr(feature = "serde", serde(tag = "type"))]
2513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2514#[repr(u32)]
2515#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2516pub enum MavFuelType {
2517    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2518    MAV_FUEL_TYPE_UNKNOWN = 0,
2519    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2520    MAV_FUEL_TYPE_LIQUID = 1,
2521    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2522    MAV_FUEL_TYPE_GAS = 2,
2523}
2524impl MavFuelType {
2525    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2526}
2527impl Default for MavFuelType {
2528    fn default() -> Self {
2529        Self::DEFAULT
2530    }
2531}
2532bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2533impl MavGeneratorStatusFlag {
2534    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2535}
2536impl Default for MavGeneratorStatusFlag {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2549pub enum MavGoto {
2550    #[doc = "Hold at the current position."]
2551    MAV_GOTO_DO_HOLD = 0,
2552    #[doc = "Continue with the next item in mission execution."]
2553    MAV_GOTO_DO_CONTINUE = 1,
2554    #[doc = "Hold at the current position of the system"]
2555    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2556    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2557    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2558}
2559impl MavGoto {
2560    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2561}
2562impl Default for MavGoto {
2563    fn default() -> Self {
2564        Self::DEFAULT
2565    }
2566}
2567#[cfg_attr(feature = "ts", derive(TS))]
2568#[cfg_attr(feature = "ts", ts(export))]
2569#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2571#[cfg_attr(feature = "serde", serde(tag = "type"))]
2572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2573#[repr(u32)]
2574#[doc = "Enumeration of landed detector states"]
2575pub enum MavLandedState {
2576    #[doc = "MAV landed state is unknown"]
2577    MAV_LANDED_STATE_UNDEFINED = 0,
2578    #[doc = "MAV is landed (on ground)"]
2579    MAV_LANDED_STATE_ON_GROUND = 1,
2580    #[doc = "MAV is in air"]
2581    MAV_LANDED_STATE_IN_AIR = 2,
2582    #[doc = "MAV currently taking off"]
2583    MAV_LANDED_STATE_TAKEOFF = 3,
2584    #[doc = "MAV currently landing"]
2585    MAV_LANDED_STATE_LANDING = 4,
2586}
2587impl MavLandedState {
2588    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2589}
2590impl Default for MavLandedState {
2591    fn default() -> Self {
2592        Self::DEFAULT
2593    }
2594}
2595#[cfg_attr(feature = "ts", derive(TS))]
2596#[cfg_attr(feature = "ts", ts(export))]
2597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2599#[cfg_attr(feature = "serde", serde(tag = "type"))]
2600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2601#[repr(u32)]
2602#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2603pub enum MavMissionResult {
2604    #[doc = "mission accepted OK"]
2605    MAV_MISSION_ACCEPTED = 0,
2606    #[doc = "Generic error / not accepting mission commands at all right now."]
2607    MAV_MISSION_ERROR = 1,
2608    #[doc = "Coordinate frame is not supported."]
2609    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2610    #[doc = "Command is not supported."]
2611    MAV_MISSION_UNSUPPORTED = 3,
2612    #[doc = "Mission items exceed storage space."]
2613    MAV_MISSION_NO_SPACE = 4,
2614    #[doc = "One of the parameters has an invalid value."]
2615    MAV_MISSION_INVALID = 5,
2616    #[doc = "param1 has an invalid value."]
2617    MAV_MISSION_INVALID_PARAM1 = 6,
2618    #[doc = "param2 has an invalid value."]
2619    MAV_MISSION_INVALID_PARAM2 = 7,
2620    #[doc = "param3 has an invalid value."]
2621    MAV_MISSION_INVALID_PARAM3 = 8,
2622    #[doc = "param4 has an invalid value."]
2623    MAV_MISSION_INVALID_PARAM4 = 9,
2624    #[doc = "x / param5 has an invalid value."]
2625    MAV_MISSION_INVALID_PARAM5_X = 10,
2626    #[doc = "y / param6 has an invalid value."]
2627    MAV_MISSION_INVALID_PARAM6_Y = 11,
2628    #[doc = "z / param7 has an invalid value."]
2629    MAV_MISSION_INVALID_PARAM7 = 12,
2630    #[doc = "Mission item received out of sequence"]
2631    MAV_MISSION_INVALID_SEQUENCE = 13,
2632    #[doc = "Not accepting any mission commands from this communication partner."]
2633    MAV_MISSION_DENIED = 14,
2634    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2635    MAV_MISSION_OPERATION_CANCELLED = 15,
2636}
2637impl MavMissionResult {
2638    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2639}
2640impl Default for MavMissionResult {
2641    fn default() -> Self {
2642        Self::DEFAULT
2643    }
2644}
2645#[cfg_attr(feature = "ts", derive(TS))]
2646#[cfg_attr(feature = "ts", ts(export))]
2647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2649#[cfg_attr(feature = "serde", serde(tag = "type"))]
2650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2651#[repr(u32)]
2652#[doc = "Type of mission items being requested/sent in mission protocol."]
2653pub enum MavMissionType {
2654    #[doc = "Items are mission commands for main mission."]
2655    MAV_MISSION_TYPE_MISSION = 0,
2656    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2657    MAV_MISSION_TYPE_FENCE = 1,
2658    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2659    MAV_MISSION_TYPE_RALLY = 2,
2660    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2661    MAV_MISSION_TYPE_ALL = 255,
2662}
2663impl MavMissionType {
2664    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2665}
2666impl Default for MavMissionType {
2667    fn default() -> Self {
2668        Self::DEFAULT
2669    }
2670}
2671#[cfg_attr(feature = "ts", derive(TS))]
2672#[cfg_attr(feature = "ts", ts(export))]
2673#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2675#[cfg_attr(feature = "serde", serde(tag = "type"))]
2676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2677#[repr(u32)]
2678#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2679pub enum MavMode {
2680    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2681    MAV_MODE_PREFLIGHT = 0,
2682    #[doc = "System is allowed to be active, under assisted RC control."]
2683    MAV_MODE_STABILIZE_DISARMED = 80,
2684    #[doc = "System is allowed to be active, under assisted RC control."]
2685    MAV_MODE_STABILIZE_ARMED = 208,
2686    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2687    MAV_MODE_MANUAL_DISARMED = 64,
2688    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2689    MAV_MODE_MANUAL_ARMED = 192,
2690    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2691    MAV_MODE_GUIDED_DISARMED = 88,
2692    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2693    MAV_MODE_GUIDED_ARMED = 216,
2694    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2695    MAV_MODE_AUTO_DISARMED = 92,
2696    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2697    MAV_MODE_AUTO_ARMED = 220,
2698    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2699    MAV_MODE_TEST_DISARMED = 66,
2700    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2701    MAV_MODE_TEST_ARMED = 194,
2702}
2703impl MavMode {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2705}
2706impl Default for MavMode {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2712impl MavModeFlag {
2713    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2714}
2715impl Default for MavModeFlag {
2716    fn default() -> Self {
2717        Self::DEFAULT
2718    }
2719}
2720#[cfg_attr(feature = "ts", derive(TS))]
2721#[cfg_attr(feature = "ts", ts(export))]
2722#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2724#[cfg_attr(feature = "serde", serde(tag = "type"))]
2725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2726#[repr(u32)]
2727#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2728pub enum MavModeFlagDecodePosition {
2729    #[doc = "First bit:  10000000"]
2730    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2731    #[doc = "Second bit: 01000000"]
2732    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2733    #[doc = "Third bit:  00100000"]
2734    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2735    #[doc = "Fourth bit: 00010000"]
2736    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2737    #[doc = "Fifth bit:  00001000"]
2738    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2739    #[doc = "Sixth bit:   00000100"]
2740    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2741    #[doc = "Seventh bit: 00000010"]
2742    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2743    #[doc = "Eighth bit: 00000001"]
2744    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2745}
2746impl MavModeFlagDecodePosition {
2747    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2748}
2749impl Default for MavModeFlagDecodePosition {
2750    fn default() -> Self {
2751        Self::DEFAULT
2752    }
2753}
2754bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2755impl MavModeProperty {
2756    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2757}
2758impl Default for MavModeProperty {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2771#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2772pub enum MavMountMode {
2773    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2774    MAV_MOUNT_MODE_RETRACT = 0,
2775    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2776    MAV_MOUNT_MODE_NEUTRAL = 1,
2777    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2778    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2779    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2780    MAV_MOUNT_MODE_RC_TARGETING = 3,
2781    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2782    MAV_MOUNT_MODE_GPS_POINT = 4,
2783    #[doc = "Gimbal tracks system with specified system ID"]
2784    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2785    #[doc = "Gimbal tracks home position"]
2786    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2787}
2788impl MavMountMode {
2789    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2790}
2791impl Default for MavMountMode {
2792    fn default() -> Self {
2793        Self::DEFAULT
2794    }
2795}
2796#[cfg_attr(feature = "ts", derive(TS))]
2797#[cfg_attr(feature = "ts", ts(export))]
2798#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2800#[cfg_attr(feature = "serde", serde(tag = "type"))]
2801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2802#[repr(u32)]
2803pub enum MavOdidArmStatus {
2804    #[doc = "Passing arming checks."]
2805    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2806    #[doc = "Generic arming failure, see error string for details."]
2807    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2808}
2809impl MavOdidArmStatus {
2810    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2811}
2812impl Default for MavOdidArmStatus {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidAuthType {
2825    #[doc = "No authentication type is specified."]
2826    MAV_ODID_AUTH_TYPE_NONE = 0,
2827    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2828    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2829    #[doc = "Signature for the Operator ID."]
2830    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2831    #[doc = "Signature for the entire message set."]
2832    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2833    #[doc = "Authentication is provided by Network Remote ID."]
2834    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2835    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2836    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2837}
2838impl MavOdidAuthType {
2839    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2840}
2841impl Default for MavOdidAuthType {
2842    fn default() -> Self {
2843        Self::DEFAULT
2844    }
2845}
2846#[cfg_attr(feature = "ts", derive(TS))]
2847#[cfg_attr(feature = "ts", ts(export))]
2848#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2850#[cfg_attr(feature = "serde", serde(tag = "type"))]
2851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2852#[repr(u32)]
2853pub enum MavOdidCategoryEu {
2854    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2855    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2856    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2857    MAV_ODID_CATEGORY_EU_OPEN = 1,
2858    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2859    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2860    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2861    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2862}
2863impl MavOdidCategoryEu {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2865}
2866impl Default for MavOdidCategoryEu {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidClassEu {
2879    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2880    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2881    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2882    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2883    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2884    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2885    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2886    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2887    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2888    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2889    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2890    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2891    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2892    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2893    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2894    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2895}
2896impl MavOdidClassEu {
2897    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2898}
2899impl Default for MavOdidClassEu {
2900    fn default() -> Self {
2901        Self::DEFAULT
2902    }
2903}
2904#[cfg_attr(feature = "ts", derive(TS))]
2905#[cfg_attr(feature = "ts", ts(export))]
2906#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2908#[cfg_attr(feature = "serde", serde(tag = "type"))]
2909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2910#[repr(u32)]
2911pub enum MavOdidClassificationType {
2912    #[doc = "The classification type for the UA is undeclared."]
2913    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2914    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2915    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2916}
2917impl MavOdidClassificationType {
2918    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2919}
2920impl Default for MavOdidClassificationType {
2921    fn default() -> Self {
2922        Self::DEFAULT
2923    }
2924}
2925#[cfg_attr(feature = "ts", derive(TS))]
2926#[cfg_attr(feature = "ts", ts(export))]
2927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2929#[cfg_attr(feature = "serde", serde(tag = "type"))]
2930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2931#[repr(u32)]
2932pub enum MavOdidDescType {
2933    #[doc = "Optional free-form text description of the purpose of the flight."]
2934    MAV_ODID_DESC_TYPE_TEXT = 0,
2935    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2936    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2937    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2938    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2939}
2940impl MavOdidDescType {
2941    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2942}
2943impl Default for MavOdidDescType {
2944    fn default() -> Self {
2945        Self::DEFAULT
2946    }
2947}
2948#[cfg_attr(feature = "ts", derive(TS))]
2949#[cfg_attr(feature = "ts", ts(export))]
2950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2952#[cfg_attr(feature = "serde", serde(tag = "type"))]
2953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2954#[repr(u32)]
2955pub enum MavOdidHeightRef {
2956    #[doc = "The height field is relative to the take-off location."]
2957    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2958    #[doc = "The height field is relative to ground."]
2959    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2960}
2961impl MavOdidHeightRef {
2962    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2963}
2964impl Default for MavOdidHeightRef {
2965    fn default() -> Self {
2966        Self::DEFAULT
2967    }
2968}
2969#[cfg_attr(feature = "ts", derive(TS))]
2970#[cfg_attr(feature = "ts", ts(export))]
2971#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2973#[cfg_attr(feature = "serde", serde(tag = "type"))]
2974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2975#[repr(u32)]
2976pub enum MavOdidHorAcc {
2977    #[doc = "The horizontal accuracy is unknown."]
2978    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2979    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2980    MAV_ODID_HOR_ACC_10NM = 1,
2981    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2982    MAV_ODID_HOR_ACC_4NM = 2,
2983    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2984    MAV_ODID_HOR_ACC_2NM = 3,
2985    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2986    MAV_ODID_HOR_ACC_1NM = 4,
2987    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2988    MAV_ODID_HOR_ACC_0_5NM = 5,
2989    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2990    MAV_ODID_HOR_ACC_0_3NM = 6,
2991    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2992    MAV_ODID_HOR_ACC_0_1NM = 7,
2993    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2994    MAV_ODID_HOR_ACC_0_05NM = 8,
2995    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2996    MAV_ODID_HOR_ACC_30_METER = 9,
2997    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2998    MAV_ODID_HOR_ACC_10_METER = 10,
2999    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3000    MAV_ODID_HOR_ACC_3_METER = 11,
3001    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3002    MAV_ODID_HOR_ACC_1_METER = 12,
3003}
3004impl MavOdidHorAcc {
3005    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3006}
3007impl Default for MavOdidHorAcc {
3008    fn default() -> Self {
3009        Self::DEFAULT
3010    }
3011}
3012#[cfg_attr(feature = "ts", derive(TS))]
3013#[cfg_attr(feature = "ts", ts(export))]
3014#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3016#[cfg_attr(feature = "serde", serde(tag = "type"))]
3017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3018#[repr(u32)]
3019pub enum MavOdidIdType {
3020    #[doc = "No type defined."]
3021    MAV_ODID_ID_TYPE_NONE = 0,
3022    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3023    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3024    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3025    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3026    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3027    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3028    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3029    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3030}
3031impl MavOdidIdType {
3032    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3033}
3034impl Default for MavOdidIdType {
3035    fn default() -> Self {
3036        Self::DEFAULT
3037    }
3038}
3039#[cfg_attr(feature = "ts", derive(TS))]
3040#[cfg_attr(feature = "ts", ts(export))]
3041#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3043#[cfg_attr(feature = "serde", serde(tag = "type"))]
3044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3045#[repr(u32)]
3046pub enum MavOdidOperatorIdType {
3047    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3048    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3049}
3050impl MavOdidOperatorIdType {
3051    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3052}
3053impl Default for MavOdidOperatorIdType {
3054    fn default() -> Self {
3055        Self::DEFAULT
3056    }
3057}
3058#[cfg_attr(feature = "ts", derive(TS))]
3059#[cfg_attr(feature = "ts", ts(export))]
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065pub enum MavOdidOperatorLocationType {
3066    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3067    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3068    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3069    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3070    #[doc = "The location/altitude of the operator are fixed values."]
3071    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3072}
3073impl MavOdidOperatorLocationType {
3074    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3075}
3076impl Default for MavOdidOperatorLocationType {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidSpeedAcc {
3089    #[doc = "The speed accuracy is unknown."]
3090    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3091    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3092    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3093    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3094    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3095    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3096    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3097    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3098    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3099}
3100impl MavOdidSpeedAcc {
3101    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3102}
3103impl Default for MavOdidSpeedAcc {
3104    fn default() -> Self {
3105        Self::DEFAULT
3106    }
3107}
3108#[cfg_attr(feature = "ts", derive(TS))]
3109#[cfg_attr(feature = "ts", ts(export))]
3110#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3112#[cfg_attr(feature = "serde", serde(tag = "type"))]
3113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3114#[repr(u32)]
3115pub enum MavOdidStatus {
3116    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3117    MAV_ODID_STATUS_UNDECLARED = 0,
3118    #[doc = "The UA is on the ground."]
3119    MAV_ODID_STATUS_GROUND = 1,
3120    #[doc = "The UA is in the air."]
3121    MAV_ODID_STATUS_AIRBORNE = 2,
3122    #[doc = "The UA is having an emergency."]
3123    MAV_ODID_STATUS_EMERGENCY = 3,
3124    #[doc = "The remote ID system is failing or unreliable in some way."]
3125    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3126}
3127impl MavOdidStatus {
3128    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3129}
3130impl Default for MavOdidStatus {
3131    fn default() -> Self {
3132        Self::DEFAULT
3133    }
3134}
3135#[cfg_attr(feature = "ts", derive(TS))]
3136#[cfg_attr(feature = "ts", ts(export))]
3137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3139#[cfg_attr(feature = "serde", serde(tag = "type"))]
3140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3141#[repr(u32)]
3142pub enum MavOdidTimeAcc {
3143    #[doc = "The timestamp accuracy is unknown."]
3144    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3145    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3146    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3147    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3148    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3149    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3150    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3151    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3152    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3153    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3154    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3155    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3156    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3157    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3158    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3159    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3160    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3161    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3162    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3163    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3164    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3165    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3166    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3167    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3168    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3169    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3170    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3171    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3172    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3173    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3174    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3175}
3176impl MavOdidTimeAcc {
3177    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3178}
3179impl Default for MavOdidTimeAcc {
3180    fn default() -> Self {
3181        Self::DEFAULT
3182    }
3183}
3184#[cfg_attr(feature = "ts", derive(TS))]
3185#[cfg_attr(feature = "ts", ts(export))]
3186#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3188#[cfg_attr(feature = "serde", serde(tag = "type"))]
3189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3190#[repr(u32)]
3191pub enum MavOdidUaType {
3192    #[doc = "No UA (Unmanned Aircraft) type defined."]
3193    MAV_ODID_UA_TYPE_NONE = 0,
3194    #[doc = "Aeroplane/Airplane. Fixed wing."]
3195    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3196    #[doc = "Helicopter or multirotor."]
3197    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3198    #[doc = "Gyroplane."]
3199    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3200    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3201    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3202    #[doc = "Ornithopter."]
3203    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3204    #[doc = "Glider."]
3205    MAV_ODID_UA_TYPE_GLIDER = 6,
3206    #[doc = "Kite."]
3207    MAV_ODID_UA_TYPE_KITE = 7,
3208    #[doc = "Free Balloon."]
3209    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3210    #[doc = "Captive Balloon."]
3211    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3212    #[doc = "Airship. E.g. a blimp."]
3213    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3214    #[doc = "Free Fall/Parachute (unpowered)."]
3215    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3216    #[doc = "Rocket."]
3217    MAV_ODID_UA_TYPE_ROCKET = 12,
3218    #[doc = "Tethered powered aircraft."]
3219    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3220    #[doc = "Ground Obstacle."]
3221    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3222    #[doc = "Other type of aircraft not listed earlier."]
3223    MAV_ODID_UA_TYPE_OTHER = 15,
3224}
3225impl MavOdidUaType {
3226    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3227}
3228impl Default for MavOdidUaType {
3229    fn default() -> Self {
3230        Self::DEFAULT
3231    }
3232}
3233#[cfg_attr(feature = "ts", derive(TS))]
3234#[cfg_attr(feature = "ts", ts(export))]
3235#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3237#[cfg_attr(feature = "serde", serde(tag = "type"))]
3238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3239#[repr(u32)]
3240pub enum MavOdidVerAcc {
3241    #[doc = "The vertical accuracy is unknown."]
3242    MAV_ODID_VER_ACC_UNKNOWN = 0,
3243    #[doc = "The vertical accuracy is smaller than 150 meter."]
3244    MAV_ODID_VER_ACC_150_METER = 1,
3245    #[doc = "The vertical accuracy is smaller than 45 meter."]
3246    MAV_ODID_VER_ACC_45_METER = 2,
3247    #[doc = "The vertical accuracy is smaller than 25 meter."]
3248    MAV_ODID_VER_ACC_25_METER = 3,
3249    #[doc = "The vertical accuracy is smaller than 10 meter."]
3250    MAV_ODID_VER_ACC_10_METER = 4,
3251    #[doc = "The vertical accuracy is smaller than 3 meter."]
3252    MAV_ODID_VER_ACC_3_METER = 5,
3253    #[doc = "The vertical accuracy is smaller than 1 meter."]
3254    MAV_ODID_VER_ACC_1_METER = 6,
3255}
3256impl MavOdidVerAcc {
3257    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3258}
3259impl Default for MavOdidVerAcc {
3260    fn default() -> Self {
3261        Self::DEFAULT
3262    }
3263}
3264#[cfg_attr(feature = "ts", derive(TS))]
3265#[cfg_attr(feature = "ts", ts(export))]
3266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3268#[cfg_attr(feature = "serde", serde(tag = "type"))]
3269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3270#[repr(u32)]
3271#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3272pub enum MavParamExtType {
3273    #[doc = "8-bit unsigned integer"]
3274    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3275    #[doc = "8-bit signed integer"]
3276    MAV_PARAM_EXT_TYPE_INT8 = 2,
3277    #[doc = "16-bit unsigned integer"]
3278    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3279    #[doc = "16-bit signed integer"]
3280    MAV_PARAM_EXT_TYPE_INT16 = 4,
3281    #[doc = "32-bit unsigned integer"]
3282    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3283    #[doc = "32-bit signed integer"]
3284    MAV_PARAM_EXT_TYPE_INT32 = 6,
3285    #[doc = "64-bit unsigned integer"]
3286    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3287    #[doc = "64-bit signed integer"]
3288    MAV_PARAM_EXT_TYPE_INT64 = 8,
3289    #[doc = "32-bit floating-point"]
3290    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3291    #[doc = "64-bit floating-point"]
3292    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3293    #[doc = "Custom Type"]
3294    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3295}
3296impl MavParamExtType {
3297    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3298}
3299impl Default for MavParamExtType {
3300    fn default() -> Self {
3301        Self::DEFAULT
3302    }
3303}
3304#[cfg_attr(feature = "ts", derive(TS))]
3305#[cfg_attr(feature = "ts", ts(export))]
3306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3308#[cfg_attr(feature = "serde", serde(tag = "type"))]
3309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3310#[repr(u32)]
3311#[doc = "Specifies the datatype of a MAVLink parameter."]
3312pub enum MavParamType {
3313    #[doc = "8-bit unsigned integer"]
3314    MAV_PARAM_TYPE_UINT8 = 1,
3315    #[doc = "8-bit signed integer"]
3316    MAV_PARAM_TYPE_INT8 = 2,
3317    #[doc = "16-bit unsigned integer"]
3318    MAV_PARAM_TYPE_UINT16 = 3,
3319    #[doc = "16-bit signed integer"]
3320    MAV_PARAM_TYPE_INT16 = 4,
3321    #[doc = "32-bit unsigned integer"]
3322    MAV_PARAM_TYPE_UINT32 = 5,
3323    #[doc = "32-bit signed integer"]
3324    MAV_PARAM_TYPE_INT32 = 6,
3325    #[doc = "64-bit unsigned integer"]
3326    MAV_PARAM_TYPE_UINT64 = 7,
3327    #[doc = "64-bit signed integer"]
3328    MAV_PARAM_TYPE_INT64 = 8,
3329    #[doc = "32-bit floating-point"]
3330    MAV_PARAM_TYPE_REAL32 = 9,
3331    #[doc = "64-bit floating-point"]
3332    MAV_PARAM_TYPE_REAL64 = 10,
3333}
3334impl MavParamType {
3335    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3336}
3337impl Default for MavParamType {
3338    fn default() -> Self {
3339        Self::DEFAULT
3340    }
3341}
3342bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3343impl MavPowerStatus {
3344    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3345}
3346impl Default for MavPowerStatus {
3347    fn default() -> Self {
3348        Self::DEFAULT
3349    }
3350}
3351bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3352impl MavProtocolCapability {
3353    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3354}
3355impl Default for MavProtocolCapability {
3356    fn default() -> Self {
3357        Self::DEFAULT
3358    }
3359}
3360#[cfg_attr(feature = "ts", derive(TS))]
3361#[cfg_attr(feature = "ts", ts(export))]
3362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3364#[cfg_attr(feature = "serde", serde(tag = "type"))]
3365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3366#[repr(u32)]
3367#[doc = "Result from a MAVLink command (MAV_CMD)"]
3368pub enum MavResult {
3369    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3370    MAV_RESULT_ACCEPTED = 0,
3371    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3372    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3373    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3374    MAV_RESULT_DENIED = 2,
3375    #[doc = "Command is not supported (unknown)."]
3376    MAV_RESULT_UNSUPPORTED = 3,
3377    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3378    MAV_RESULT_FAILED = 4,
3379    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3380    MAV_RESULT_IN_PROGRESS = 5,
3381    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3382    MAV_RESULT_CANCELLED = 6,
3383    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3384    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3385    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3386    MAV_RESULT_COMMAND_INT_ONLY = 8,
3387    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3388    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3389}
3390impl MavResult {
3391    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3392}
3393impl Default for MavResult {
3394    fn default() -> Self {
3395        Self::DEFAULT
3396    }
3397}
3398#[cfg_attr(feature = "ts", derive(TS))]
3399#[cfg_attr(feature = "ts", ts(export))]
3400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3402#[cfg_attr(feature = "serde", serde(tag = "type"))]
3403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3404#[repr(u32)]
3405#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3406#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3407pub enum MavRoi {
3408    #[doc = "No region of interest."]
3409    MAV_ROI_NONE = 0,
3410    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3411    MAV_ROI_WPNEXT = 1,
3412    #[doc = "Point toward given waypoint."]
3413    MAV_ROI_WPINDEX = 2,
3414    #[doc = "Point toward fixed location."]
3415    MAV_ROI_LOCATION = 3,
3416    #[doc = "Point toward of given id."]
3417    MAV_ROI_TARGET = 4,
3418}
3419impl MavRoi {
3420    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3421}
3422impl Default for MavRoi {
3423    fn default() -> Self {
3424        Self::DEFAULT
3425    }
3426}
3427#[cfg_attr(feature = "ts", derive(TS))]
3428#[cfg_attr(feature = "ts", ts(export))]
3429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3431#[cfg_attr(feature = "serde", serde(tag = "type"))]
3432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3433#[repr(u32)]
3434#[doc = "Enumeration of sensor orientation, according to its rotations"]
3435pub enum MavSensorOrientation {
3436    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3437    MAV_SENSOR_ROTATION_NONE = 0,
3438    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3439    MAV_SENSOR_ROTATION_YAW_45 = 1,
3440    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3441    MAV_SENSOR_ROTATION_YAW_90 = 2,
3442    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3443    MAV_SENSOR_ROTATION_YAW_135 = 3,
3444    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3445    MAV_SENSOR_ROTATION_YAW_180 = 4,
3446    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3447    MAV_SENSOR_ROTATION_YAW_225 = 5,
3448    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3449    MAV_SENSOR_ROTATION_YAW_270 = 6,
3450    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3451    MAV_SENSOR_ROTATION_YAW_315 = 7,
3452    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3454    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3455    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3456    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3458    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3459    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3460    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3461    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3462    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3463    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3464    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3465    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3466    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3467    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3468    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3469    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3470    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3471    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3472    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3473    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3474    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3475    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3476    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3477    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3478    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3479    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3480    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3481    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3482    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3483    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3484    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3485    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3486    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3487    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3488    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3489    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3490    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3491    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3492    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3493    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3494    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3496    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3497    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3498    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3499    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3500    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3501    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3502    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3503    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3504    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3505    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3506    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3507    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3508    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3509    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3510    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3511    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3512    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3513    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3514    #[doc = "Pitch: 315"]
3515    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3516    #[doc = "Roll: 90, Pitch: 315"]
3517    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3518    #[doc = "Custom orientation"]
3519    MAV_SENSOR_ROTATION_CUSTOM = 100,
3520}
3521impl MavSensorOrientation {
3522    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3523}
3524impl Default for MavSensorOrientation {
3525    fn default() -> Self {
3526        Self::DEFAULT
3527    }
3528}
3529#[cfg_attr(feature = "ts", derive(TS))]
3530#[cfg_attr(feature = "ts", ts(export))]
3531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3533#[cfg_attr(feature = "serde", serde(tag = "type"))]
3534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3535#[repr(u32)]
3536#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3537pub enum MavSeverity {
3538    #[doc = "System is unusable. This is a \"panic\" condition."]
3539    MAV_SEVERITY_EMERGENCY = 0,
3540    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3541    MAV_SEVERITY_ALERT = 1,
3542    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3543    MAV_SEVERITY_CRITICAL = 2,
3544    #[doc = "Indicates an error in secondary/redundant systems."]
3545    MAV_SEVERITY_ERROR = 3,
3546    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3547    MAV_SEVERITY_WARNING = 4,
3548    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3549    MAV_SEVERITY_NOTICE = 5,
3550    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3551    MAV_SEVERITY_INFO = 6,
3552    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3553    MAV_SEVERITY_DEBUG = 7,
3554}
3555impl MavSeverity {
3556    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3557}
3558impl Default for MavSeverity {
3559    fn default() -> Self {
3560        Self::DEFAULT
3561    }
3562}
3563#[cfg_attr(feature = "ts", derive(TS))]
3564#[cfg_attr(feature = "ts", ts(export))]
3565#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3567#[cfg_attr(feature = "serde", serde(tag = "type"))]
3568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3569#[repr(u32)]
3570#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3571pub enum MavStandardMode {
3572    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3573    MAV_STANDARD_MODE_NON_STANDARD = 0,
3574    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3575    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3576    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3577    MAV_STANDARD_MODE_ORBIT = 2,
3578    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3579    MAV_STANDARD_MODE_CRUISE = 3,
3580    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3581    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3582    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3583    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3584    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3585    MAV_STANDARD_MODE_MISSION = 6,
3586    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3587    MAV_STANDARD_MODE_LAND = 7,
3588    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3589    MAV_STANDARD_MODE_TAKEOFF = 8,
3590}
3591impl MavStandardMode {
3592    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3593}
3594impl Default for MavStandardMode {
3595    fn default() -> Self {
3596        Self::DEFAULT
3597    }
3598}
3599#[cfg_attr(feature = "ts", derive(TS))]
3600#[cfg_attr(feature = "ts", ts(export))]
3601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3603#[cfg_attr(feature = "serde", serde(tag = "type"))]
3604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3605#[repr(u32)]
3606pub enum MavState {
3607    #[doc = "Uninitialized system, state is unknown."]
3608    MAV_STATE_UNINIT = 0,
3609    #[doc = "System is booting up."]
3610    MAV_STATE_BOOT = 1,
3611    #[doc = "System is calibrating and not flight-ready."]
3612    MAV_STATE_CALIBRATING = 2,
3613    #[doc = "System is grounded and on standby. It can be launched any time."]
3614    MAV_STATE_STANDBY = 3,
3615    #[doc = "System is active and might be already airborne. Motors are engaged."]
3616    MAV_STATE_ACTIVE = 4,
3617    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3618    MAV_STATE_CRITICAL = 5,
3619    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3620    MAV_STATE_EMERGENCY = 6,
3621    #[doc = "System just initialized its power-down sequence, will shut down now."]
3622    MAV_STATE_POWEROFF = 7,
3623    #[doc = "System is terminating itself (failsafe or commanded)."]
3624    MAV_STATE_FLIGHT_TERMINATION = 8,
3625}
3626impl MavState {
3627    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3628}
3629impl Default for MavState {
3630    fn default() -> Self {
3631        Self::DEFAULT
3632    }
3633}
3634bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3635impl MavSysStatusSensor {
3636    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3637}
3638impl Default for MavSysStatusSensor {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3644impl MavSysStatusSensorExtended {
3645    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3646}
3647impl Default for MavSysStatusSensorExtended {
3648    fn default() -> Self {
3649        Self::DEFAULT
3650    }
3651}
3652#[cfg_attr(feature = "ts", derive(TS))]
3653#[cfg_attr(feature = "ts", ts(export))]
3654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3656#[cfg_attr(feature = "serde", serde(tag = "type"))]
3657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3658#[repr(u32)]
3659pub enum MavTunnelPayloadType {
3660    #[doc = "Encoding of payload unknown."]
3661    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3662    #[doc = "Registered for STorM32 gimbal controller."]
3663    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3664    #[doc = "Registered for STorM32 gimbal controller."]
3665    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3666    #[doc = "Registered for STorM32 gimbal controller."]
3667    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3668    #[doc = "Registered for STorM32 gimbal controller."]
3669    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3670    #[doc = "Registered for STorM32 gimbal controller."]
3671    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3672    #[doc = "Registered for STorM32 gimbal controller."]
3673    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3674    #[doc = "Registered for STorM32 gimbal controller."]
3675    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3676    #[doc = "Registered for STorM32 gimbal controller."]
3677    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3678    #[doc = "Registered for STorM32 gimbal controller."]
3679    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3680    #[doc = "Registered for STorM32 gimbal controller."]
3681    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3682    #[doc = "Registered for ModalAI remote OSD protocol."]
3683    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3684    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3685    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3686    #[doc = "Registered for ModalAI vendor use."]
3687    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3688}
3689impl MavTunnelPayloadType {
3690    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3691}
3692impl Default for MavTunnelPayloadType {
3693    fn default() -> Self {
3694        Self::DEFAULT
3695    }
3696}
3697#[cfg_attr(feature = "ts", derive(TS))]
3698#[cfg_attr(feature = "ts", ts(export))]
3699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3701#[cfg_attr(feature = "serde", serde(tag = "type"))]
3702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3703#[repr(u32)]
3704#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3705pub enum MavType {
3706    #[doc = "Generic micro air vehicle"]
3707    MAV_TYPE_GENERIC = 0,
3708    #[doc = "Fixed wing aircraft."]
3709    MAV_TYPE_FIXED_WING = 1,
3710    #[doc = "Quadrotor"]
3711    MAV_TYPE_QUADROTOR = 2,
3712    #[doc = "Coaxial helicopter"]
3713    MAV_TYPE_COAXIAL = 3,
3714    #[doc = "Normal helicopter with tail rotor."]
3715    MAV_TYPE_HELICOPTER = 4,
3716    #[doc = "Ground installation"]
3717    MAV_TYPE_ANTENNA_TRACKER = 5,
3718    #[doc = "Operator control unit / ground control station"]
3719    MAV_TYPE_GCS = 6,
3720    #[doc = "Airship, controlled"]
3721    MAV_TYPE_AIRSHIP = 7,
3722    #[doc = "Free balloon, uncontrolled"]
3723    MAV_TYPE_FREE_BALLOON = 8,
3724    #[doc = "Rocket"]
3725    MAV_TYPE_ROCKET = 9,
3726    #[doc = "Ground rover"]
3727    MAV_TYPE_GROUND_ROVER = 10,
3728    #[doc = "Surface vessel, boat, ship"]
3729    MAV_TYPE_SURFACE_BOAT = 11,
3730    #[doc = "Submarine"]
3731    MAV_TYPE_SUBMARINE = 12,
3732    #[doc = "Hexarotor"]
3733    MAV_TYPE_HEXAROTOR = 13,
3734    #[doc = "Octorotor"]
3735    MAV_TYPE_OCTOROTOR = 14,
3736    #[doc = "Tricopter"]
3737    MAV_TYPE_TRICOPTER = 15,
3738    #[doc = "Flapping wing"]
3739    MAV_TYPE_FLAPPING_WING = 16,
3740    #[doc = "Kite"]
3741    MAV_TYPE_KITE = 17,
3742    #[doc = "Onboard companion controller"]
3743    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3744    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3745    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3746    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3747    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3748    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3749    MAV_TYPE_VTOL_TILTROTOR = 21,
3750    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3751    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3752    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3753    MAV_TYPE_VTOL_TAILSITTER = 23,
3754    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3755    MAV_TYPE_VTOL_TILTWING = 24,
3756    #[doc = "VTOL reserved 5"]
3757    MAV_TYPE_VTOL_RESERVED5 = 25,
3758    #[doc = "Gimbal"]
3759    MAV_TYPE_GIMBAL = 26,
3760    #[doc = "ADSB system"]
3761    MAV_TYPE_ADSB = 27,
3762    #[doc = "Steerable, nonrigid airfoil"]
3763    MAV_TYPE_PARAFOIL = 28,
3764    #[doc = "Dodecarotor"]
3765    MAV_TYPE_DODECAROTOR = 29,
3766    #[doc = "Camera"]
3767    MAV_TYPE_CAMERA = 30,
3768    #[doc = "Charging station"]
3769    MAV_TYPE_CHARGING_STATION = 31,
3770    #[doc = "FLARM collision avoidance system"]
3771    MAV_TYPE_FLARM = 32,
3772    #[doc = "Servo"]
3773    MAV_TYPE_SERVO = 33,
3774    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3775    MAV_TYPE_ODID = 34,
3776    #[doc = "Decarotor"]
3777    MAV_TYPE_DECAROTOR = 35,
3778    #[doc = "Battery"]
3779    MAV_TYPE_BATTERY = 36,
3780    #[doc = "Parachute"]
3781    MAV_TYPE_PARACHUTE = 37,
3782    #[doc = "Log"]
3783    MAV_TYPE_LOG = 38,
3784    #[doc = "OSD"]
3785    MAV_TYPE_OSD = 39,
3786    #[doc = "IMU"]
3787    MAV_TYPE_IMU = 40,
3788    #[doc = "GPS"]
3789    MAV_TYPE_GPS = 41,
3790    #[doc = "Winch"]
3791    MAV_TYPE_WINCH = 42,
3792    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3793    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3794    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3795    MAV_TYPE_ILLUMINATOR = 44,
3796    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3797    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3798}
3799impl MavType {
3800    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3801}
3802impl Default for MavType {
3803    fn default() -> Self {
3804        Self::DEFAULT
3805    }
3806}
3807#[cfg_attr(feature = "ts", derive(TS))]
3808#[cfg_attr(feature = "ts", ts(export))]
3809#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3811#[cfg_attr(feature = "serde", serde(tag = "type"))]
3812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3813#[repr(u32)]
3814#[doc = "Enumeration of VTOL states"]
3815pub enum MavVtolState {
3816    #[doc = "MAV is not configured as VTOL"]
3817    MAV_VTOL_STATE_UNDEFINED = 0,
3818    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3819    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3820    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3821    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3822    #[doc = "VTOL is in multicopter state"]
3823    MAV_VTOL_STATE_MC = 3,
3824    #[doc = "VTOL is in fixed-wing state"]
3825    MAV_VTOL_STATE_FW = 4,
3826}
3827impl MavVtolState {
3828    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3829}
3830impl Default for MavVtolState {
3831    fn default() -> Self {
3832        Self::DEFAULT
3833    }
3834}
3835bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3836impl MavWinchStatusFlag {
3837    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3838}
3839impl Default for MavWinchStatusFlag {
3840    fn default() -> Self {
3841        Self::DEFAULT
3842    }
3843}
3844#[cfg_attr(feature = "ts", derive(TS))]
3845#[cfg_attr(feature = "ts", ts(export))]
3846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3848#[cfg_attr(feature = "serde", serde(tag = "type"))]
3849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3850#[repr(u32)]
3851pub enum MavlinkDataStreamType {
3852    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3853    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3854    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3855    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3856    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3857    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3858}
3859impl MavlinkDataStreamType {
3860    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3861}
3862impl Default for MavlinkDataStreamType {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3875pub enum MissionState {
3876    #[doc = "The mission status reporting is not supported."]
3877    MISSION_STATE_UNKNOWN = 0,
3878    #[doc = "No mission on the vehicle."]
3879    MISSION_STATE_NO_MISSION = 1,
3880    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3881    MISSION_STATE_NOT_STARTED = 2,
3882    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3883    MISSION_STATE_ACTIVE = 3,
3884    #[doc = "Mission is paused when in auto mode."]
3885    MISSION_STATE_PAUSED = 4,
3886    #[doc = "Mission has executed all mission items."]
3887    MISSION_STATE_COMPLETE = 5,
3888}
3889impl MissionState {
3890    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3891}
3892impl Default for MissionState {
3893    fn default() -> Self {
3894        Self::DEFAULT
3895    }
3896}
3897#[cfg_attr(feature = "ts", derive(TS))]
3898#[cfg_attr(feature = "ts", ts(export))]
3899#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3901#[cfg_attr(feature = "serde", serde(tag = "type"))]
3902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3903#[repr(u32)]
3904#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3905pub enum MotorTestOrder {
3906    #[doc = "Default autopilot motor test method."]
3907    MOTOR_TEST_ORDER_DEFAULT = 0,
3908    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3909    MOTOR_TEST_ORDER_SEQUENCE = 1,
3910    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3911    MOTOR_TEST_ORDER_BOARD = 2,
3912}
3913impl MotorTestOrder {
3914    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3915}
3916impl Default for MotorTestOrder {
3917    fn default() -> Self {
3918        Self::DEFAULT
3919    }
3920}
3921#[cfg_attr(feature = "ts", derive(TS))]
3922#[cfg_attr(feature = "ts", ts(export))]
3923#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3925#[cfg_attr(feature = "serde", serde(tag = "type"))]
3926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3927#[repr(u32)]
3928#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3929pub enum MotorTestThrottleType {
3930    #[doc = "Throttle as a percentage (0 ~ 100)"]
3931    MOTOR_TEST_THROTTLE_PERCENT = 0,
3932    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3933    MOTOR_TEST_THROTTLE_PWM = 1,
3934    #[doc = "Throttle pass-through from pilot's transmitter."]
3935    MOTOR_TEST_THROTTLE_PILOT = 2,
3936    #[doc = "Per-motor compass calibration test."]
3937    MOTOR_TEST_COMPASS_CAL = 3,
3938}
3939impl MotorTestThrottleType {
3940    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3941}
3942impl Default for MotorTestThrottleType {
3943    fn default() -> Self {
3944        Self::DEFAULT
3945    }
3946}
3947#[cfg_attr(feature = "ts", derive(TS))]
3948#[cfg_attr(feature = "ts", ts(export))]
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954pub enum NavVtolLandOptions {
3955    #[doc = "Default autopilot landing behaviour."]
3956    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3957    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3958    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3959    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3960    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3961}
3962impl NavVtolLandOptions {
3963    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3964}
3965impl Default for NavVtolLandOptions {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Yaw behaviour during orbit flight."]
3978pub enum OrbitYawBehaviour {
3979    #[doc = "Vehicle front points to the center (default)."]
3980    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3981    #[doc = "Vehicle front holds heading when message received."]
3982    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3983    #[doc = "Yaw uncontrolled."]
3984    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3985    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3986    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3987    #[doc = "Yaw controlled by RC input."]
3988    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3989    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3990    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3991}
3992impl OrbitYawBehaviour {
3993    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3994}
3995impl Default for OrbitYawBehaviour {
3996    fn default() -> Self {
3997        Self::DEFAULT
3998    }
3999}
4000#[cfg_attr(feature = "ts", derive(TS))]
4001#[cfg_attr(feature = "ts", ts(export))]
4002#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4004#[cfg_attr(feature = "serde", serde(tag = "type"))]
4005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4006#[repr(u32)]
4007#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4008pub enum ParachuteAction {
4009    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4010    PARACHUTE_DISABLE = 0,
4011    #[doc = "Enable auto-release of parachute."]
4012    PARACHUTE_ENABLE = 1,
4013    #[doc = "Release parachute and kill motors."]
4014    PARACHUTE_RELEASE = 2,
4015}
4016impl ParachuteAction {
4017    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4018}
4019impl Default for ParachuteAction {
4020    fn default() -> Self {
4021        Self::DEFAULT
4022    }
4023}
4024#[cfg_attr(feature = "ts", derive(TS))]
4025#[cfg_attr(feature = "ts", ts(export))]
4026#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4028#[cfg_attr(feature = "serde", serde(tag = "type"))]
4029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4030#[repr(u32)]
4031#[doc = "Result from PARAM_EXT_SET message."]
4032pub enum ParamAck {
4033    #[doc = "Parameter value ACCEPTED and SET"]
4034    PARAM_ACK_ACCEPTED = 0,
4035    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4036    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4037    #[doc = "Parameter failed to set"]
4038    PARAM_ACK_FAILED = 2,
4039    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4040    PARAM_ACK_IN_PROGRESS = 3,
4041}
4042impl ParamAck {
4043    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4044}
4045impl Default for ParamAck {
4046    fn default() -> Self {
4047        Self::DEFAULT
4048    }
4049}
4050bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4051impl PositionTargetTypemask {
4052    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4053}
4054impl Default for PositionTargetTypemask {
4055    fn default() -> Self {
4056        Self::DEFAULT
4057    }
4058}
4059#[cfg_attr(feature = "ts", derive(TS))]
4060#[cfg_attr(feature = "ts", ts(export))]
4061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4063#[cfg_attr(feature = "serde", serde(tag = "type"))]
4064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4065#[repr(u32)]
4066#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4067pub enum PrecisionLandMode {
4068    #[doc = "Normal (non-precision) landing."]
4069    PRECISION_LAND_MODE_DISABLED = 0,
4070    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4071    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4072    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4073    PRECISION_LAND_MODE_REQUIRED = 2,
4074}
4075impl PrecisionLandMode {
4076    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4077}
4078impl Default for PrecisionLandMode {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4091pub enum PreflightStorageMissionAction {
4092    #[doc = "Read current mission data from persistent storage"]
4093    MISSION_READ_PERSISTENT = 0,
4094    #[doc = "Write current mission data to persistent storage"]
4095    MISSION_WRITE_PERSISTENT = 1,
4096    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4097    MISSION_RESET_DEFAULT = 2,
4098}
4099impl PreflightStorageMissionAction {
4100    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4101}
4102impl Default for PreflightStorageMissionAction {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4115pub enum PreflightStorageParameterAction {
4116    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4117    PARAM_READ_PERSISTENT = 0,
4118    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4119    PARAM_WRITE_PERSISTENT = 1,
4120    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4121    PARAM_RESET_CONFIG_DEFAULT = 2,
4122    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4123    PARAM_RESET_SENSOR_DEFAULT = 3,
4124    #[doc = "Reset all parameters, including operation counters, to default values"]
4125    PARAM_RESET_ALL_DEFAULT = 4,
4126}
4127impl PreflightStorageParameterAction {
4128    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4129}
4130impl Default for PreflightStorageParameterAction {
4131    fn default() -> Self {
4132        Self::DEFAULT
4133    }
4134}
4135#[cfg_attr(feature = "ts", derive(TS))]
4136#[cfg_attr(feature = "ts", ts(export))]
4137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4139#[cfg_attr(feature = "serde", serde(tag = "type"))]
4140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4141#[repr(u32)]
4142#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4143pub enum RcSubType {
4144    #[doc = "Spektrum DSM2"]
4145    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4146    #[doc = "Spektrum DSMX"]
4147    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4148    #[doc = "Spektrum DSMX8"]
4149    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4150}
4151impl RcSubType {
4152    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4153}
4154impl Default for RcSubType {
4155    fn default() -> Self {
4156        Self::DEFAULT
4157    }
4158}
4159#[cfg_attr(feature = "ts", derive(TS))]
4160#[cfg_attr(feature = "ts", ts(export))]
4161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4163#[cfg_attr(feature = "serde", serde(tag = "type"))]
4164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4165#[repr(u32)]
4166#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4167pub enum RcType {
4168    #[doc = "Spektrum"]
4169    RC_TYPE_SPEKTRUM = 0,
4170    #[doc = "CRSF"]
4171    RC_TYPE_CRSF = 1,
4172}
4173impl RcType {
4174    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4175}
4176impl Default for RcType {
4177    fn default() -> Self {
4178        Self::DEFAULT
4179    }
4180}
4181#[cfg_attr(feature = "ts", derive(TS))]
4182#[cfg_attr(feature = "ts", ts(export))]
4183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4185#[cfg_attr(feature = "serde", serde(tag = "type"))]
4186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4187#[repr(u32)]
4188#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4189pub enum RebootShutdownConditions {
4190    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4191    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4192    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4193    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4194}
4195impl RebootShutdownConditions {
4196    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4197}
4198impl Default for RebootShutdownConditions {
4199    fn default() -> Self {
4200        Self::DEFAULT
4201    }
4202}
4203#[cfg_attr(feature = "ts", derive(TS))]
4204#[cfg_attr(feature = "ts", ts(export))]
4205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4207#[cfg_attr(feature = "serde", serde(tag = "type"))]
4208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4209#[repr(u32)]
4210#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4211pub enum RtkBaselineCoordinateSystem {
4212    #[doc = "Earth-centered, Earth-fixed"]
4213    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4214    #[doc = "RTK basestation centered, north, east, down"]
4215    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4216}
4217impl RtkBaselineCoordinateSystem {
4218    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4219}
4220impl Default for RtkBaselineCoordinateSystem {
4221    fn default() -> Self {
4222        Self::DEFAULT
4223    }
4224}
4225#[cfg_attr(feature = "ts", derive(TS))]
4226#[cfg_attr(feature = "ts", ts(export))]
4227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4229#[cfg_attr(feature = "serde", serde(tag = "type"))]
4230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4231#[repr(u32)]
4232#[doc = "Possible safety switch states."]
4233pub enum SafetySwitchState {
4234    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4235    SAFETY_SWITCH_STATE_SAFE = 0,
4236    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4237    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4238}
4239impl SafetySwitchState {
4240    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4241}
4242impl Default for SafetySwitchState {
4243    fn default() -> Self {
4244        Self::DEFAULT
4245    }
4246}
4247#[cfg_attr(feature = "ts", derive(TS))]
4248#[cfg_attr(feature = "ts", ts(export))]
4249#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4251#[cfg_attr(feature = "serde", serde(tag = "type"))]
4252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4253#[repr(u32)]
4254#[doc = "SERIAL_CONTROL device types"]
4255pub enum SerialControlDev {
4256    #[doc = "First telemetry port"]
4257    SERIAL_CONTROL_DEV_TELEM1 = 0,
4258    #[doc = "Second telemetry port"]
4259    SERIAL_CONTROL_DEV_TELEM2 = 1,
4260    #[doc = "First GPS port"]
4261    SERIAL_CONTROL_DEV_GPS1 = 2,
4262    #[doc = "Second GPS port"]
4263    SERIAL_CONTROL_DEV_GPS2 = 3,
4264    #[doc = "system shell"]
4265    SERIAL_CONTROL_DEV_SHELL = 10,
4266    #[doc = "SERIAL0"]
4267    SERIAL_CONTROL_SERIAL0 = 100,
4268    #[doc = "SERIAL1"]
4269    SERIAL_CONTROL_SERIAL1 = 101,
4270    #[doc = "SERIAL2"]
4271    SERIAL_CONTROL_SERIAL2 = 102,
4272    #[doc = "SERIAL3"]
4273    SERIAL_CONTROL_SERIAL3 = 103,
4274    #[doc = "SERIAL4"]
4275    SERIAL_CONTROL_SERIAL4 = 104,
4276    #[doc = "SERIAL5"]
4277    SERIAL_CONTROL_SERIAL5 = 105,
4278    #[doc = "SERIAL6"]
4279    SERIAL_CONTROL_SERIAL6 = 106,
4280    #[doc = "SERIAL7"]
4281    SERIAL_CONTROL_SERIAL7 = 107,
4282    #[doc = "SERIAL8"]
4283    SERIAL_CONTROL_SERIAL8 = 108,
4284    #[doc = "SERIAL9"]
4285    SERIAL_CONTROL_SERIAL9 = 109,
4286}
4287impl SerialControlDev {
4288    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4289}
4290impl Default for SerialControlDev {
4291    fn default() -> Self {
4292        Self::DEFAULT
4293    }
4294}
4295bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4296impl SerialControlFlag {
4297    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4298}
4299impl Default for SerialControlFlag {
4300    fn default() -> Self {
4301        Self::DEFAULT
4302    }
4303}
4304#[cfg_attr(feature = "ts", derive(TS))]
4305#[cfg_attr(feature = "ts", ts(export))]
4306#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4308#[cfg_attr(feature = "serde", serde(tag = "type"))]
4309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4310#[repr(u32)]
4311#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4312pub enum SetFocusType {
4313    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4314    FOCUS_TYPE_STEP = 0,
4315    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4316    FOCUS_TYPE_CONTINUOUS = 1,
4317    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4318    FOCUS_TYPE_RANGE = 2,
4319    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4320    FOCUS_TYPE_METERS = 3,
4321    #[doc = "Focus automatically."]
4322    FOCUS_TYPE_AUTO = 4,
4323    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4324    FOCUS_TYPE_AUTO_SINGLE = 5,
4325    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4326    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4327}
4328impl SetFocusType {
4329    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4330}
4331impl Default for SetFocusType {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4344pub enum SpeedType {
4345    #[doc = "Airspeed"]
4346    SPEED_TYPE_AIRSPEED = 0,
4347    #[doc = "Groundspeed"]
4348    SPEED_TYPE_GROUNDSPEED = 1,
4349    #[doc = "Climb speed"]
4350    SPEED_TYPE_CLIMB_SPEED = 2,
4351    #[doc = "Descent speed"]
4352    SPEED_TYPE_DESCENT_SPEED = 3,
4353}
4354impl SpeedType {
4355    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4356}
4357impl Default for SpeedType {
4358    fn default() -> Self {
4359        Self::DEFAULT
4360    }
4361}
4362#[cfg_attr(feature = "ts", derive(TS))]
4363#[cfg_attr(feature = "ts", ts(export))]
4364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4366#[cfg_attr(feature = "serde", serde(tag = "type"))]
4367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4368#[repr(u32)]
4369#[doc = "Flags to indicate the status of camera storage."]
4370pub enum StorageStatus {
4371    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4372    STORAGE_STATUS_EMPTY = 0,
4373    #[doc = "Storage present but unformatted."]
4374    STORAGE_STATUS_UNFORMATTED = 1,
4375    #[doc = "Storage present and ready."]
4376    STORAGE_STATUS_READY = 2,
4377    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4378    STORAGE_STATUS_NOT_SUPPORTED = 3,
4379}
4380impl StorageStatus {
4381    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4382}
4383impl Default for StorageStatus {
4384    fn default() -> Self {
4385        Self::DEFAULT
4386    }
4387}
4388#[cfg_attr(feature = "ts", derive(TS))]
4389#[cfg_attr(feature = "ts", ts(export))]
4390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4392#[cfg_attr(feature = "serde", serde(tag = "type"))]
4393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4394#[repr(u32)]
4395#[doc = "Flags to indicate the type of storage."]
4396pub enum StorageType {
4397    #[doc = "Storage type is not known."]
4398    STORAGE_TYPE_UNKNOWN = 0,
4399    #[doc = "Storage type is USB device."]
4400    STORAGE_TYPE_USB_STICK = 1,
4401    #[doc = "Storage type is SD card."]
4402    STORAGE_TYPE_SD = 2,
4403    #[doc = "Storage type is microSD card."]
4404    STORAGE_TYPE_MICROSD = 3,
4405    #[doc = "Storage type is CFast."]
4406    STORAGE_TYPE_CF = 4,
4407    #[doc = "Storage type is CFexpress."]
4408    STORAGE_TYPE_CFE = 5,
4409    #[doc = "Storage type is XQD."]
4410    STORAGE_TYPE_XQD = 6,
4411    #[doc = "Storage type is HD mass storage type."]
4412    STORAGE_TYPE_HD = 7,
4413    #[doc = "Storage type is other, not listed type."]
4414    STORAGE_TYPE_OTHER = 254,
4415}
4416impl StorageType {
4417    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4418}
4419impl Default for StorageType {
4420    fn default() -> Self {
4421        Self::DEFAULT
4422    }
4423}
4424bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4425impl StorageUsageFlag {
4426    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4427}
4428impl Default for StorageUsageFlag {
4429    fn default() -> Self {
4430        Self::DEFAULT
4431    }
4432}
4433#[cfg_attr(feature = "ts", derive(TS))]
4434#[cfg_attr(feature = "ts", ts(export))]
4435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4437#[cfg_attr(feature = "serde", serde(tag = "type"))]
4438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4439#[repr(u32)]
4440#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4441pub enum TuneFormat {
4442    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4443    TUNE_FORMAT_QBASIC1_1 = 1,
4444    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4445    TUNE_FORMAT_MML_MODERN = 2,
4446}
4447impl TuneFormat {
4448    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4449}
4450impl Default for TuneFormat {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455#[cfg_attr(feature = "ts", derive(TS))]
4456#[cfg_attr(feature = "ts", ts(export))]
4457#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4459#[cfg_attr(feature = "serde", serde(tag = "type"))]
4460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4461#[repr(u32)]
4462#[doc = "Generalized UAVCAN node health"]
4463pub enum UavcanNodeHealth {
4464    #[doc = "The node is functioning properly."]
4465    UAVCAN_NODE_HEALTH_OK = 0,
4466    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4467    UAVCAN_NODE_HEALTH_WARNING = 1,
4468    #[doc = "The node has encountered a major failure."]
4469    UAVCAN_NODE_HEALTH_ERROR = 2,
4470    #[doc = "The node has suffered a fatal malfunction."]
4471    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4472}
4473impl UavcanNodeHealth {
4474    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4475}
4476impl Default for UavcanNodeHealth {
4477    fn default() -> Self {
4478        Self::DEFAULT
4479    }
4480}
4481#[cfg_attr(feature = "ts", derive(TS))]
4482#[cfg_attr(feature = "ts", ts(export))]
4483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4485#[cfg_attr(feature = "serde", serde(tag = "type"))]
4486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4487#[repr(u32)]
4488#[doc = "Generalized UAVCAN node mode"]
4489pub enum UavcanNodeMode {
4490    #[doc = "The node is performing its primary functions."]
4491    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4492    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4493    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4494    #[doc = "The node is under maintenance."]
4495    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4496    #[doc = "The node is in the process of updating its software."]
4497    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4498    #[doc = "The node is no longer available online."]
4499    UAVCAN_NODE_MODE_OFFLINE = 7,
4500}
4501impl UavcanNodeMode {
4502    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4503}
4504impl Default for UavcanNodeMode {
4505    fn default() -> Self {
4506        Self::DEFAULT
4507    }
4508}
4509bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4510impl UtmDataAvailFlags {
4511    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4512}
4513impl Default for UtmDataAvailFlags {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518#[cfg_attr(feature = "ts", derive(TS))]
4519#[cfg_attr(feature = "ts", ts(export))]
4520#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4522#[cfg_attr(feature = "serde", serde(tag = "type"))]
4523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4524#[repr(u32)]
4525#[doc = "Airborne status of UAS."]
4526pub enum UtmFlightState {
4527    #[doc = "The flight state can't be determined."]
4528    UTM_FLIGHT_STATE_UNKNOWN = 1,
4529    #[doc = "UAS on ground."]
4530    UTM_FLIGHT_STATE_GROUND = 2,
4531    #[doc = "UAS airborne."]
4532    UTM_FLIGHT_STATE_AIRBORNE = 3,
4533    #[doc = "UAS is in an emergency flight state."]
4534    UTM_FLIGHT_STATE_EMERGENCY = 16,
4535    #[doc = "UAS has no active controls."]
4536    UTM_FLIGHT_STATE_NOCTRL = 32,
4537}
4538impl UtmFlightState {
4539    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4540}
4541impl Default for UtmFlightState {
4542    fn default() -> Self {
4543        Self::DEFAULT
4544    }
4545}
4546#[cfg_attr(feature = "ts", derive(TS))]
4547#[cfg_attr(feature = "ts", ts(export))]
4548#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4550#[cfg_attr(feature = "serde", serde(tag = "type"))]
4551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4552#[repr(u32)]
4553#[doc = "Video stream encodings"]
4554pub enum VideoStreamEncoding {
4555    #[doc = "Stream encoding is unknown"]
4556    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4557    #[doc = "Stream encoding is H.264"]
4558    VIDEO_STREAM_ENCODING_H264 = 1,
4559    #[doc = "Stream encoding is H.265"]
4560    VIDEO_STREAM_ENCODING_H265 = 2,
4561}
4562impl VideoStreamEncoding {
4563    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4564}
4565impl Default for VideoStreamEncoding {
4566    fn default() -> Self {
4567        Self::DEFAULT
4568    }
4569}
4570bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4571impl VideoStreamStatusFlags {
4572    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4573}
4574impl Default for VideoStreamStatusFlags {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "Video stream types"]
4587pub enum VideoStreamType {
4588    #[doc = "Stream is RTSP"]
4589    VIDEO_STREAM_TYPE_RTSP = 0,
4590    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4591    VIDEO_STREAM_TYPE_RTPUDP = 1,
4592    #[doc = "Stream is MPEG on TCP"]
4593    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4594    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4595    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4596}
4597impl VideoStreamType {
4598    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4599}
4600impl Default for VideoStreamType {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Direction of VTOL transition"]
4613pub enum VtolTransitionHeading {
4614    #[doc = "Respect the heading configuration of the vehicle."]
4615    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4616    #[doc = "Use the heading pointing towards the next waypoint."]
4617    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4618    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4619    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4620    #[doc = "Use the specified heading in parameter 4."]
4621    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4622    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4623    VTOL_TRANSITION_HEADING_ANY = 4,
4624}
4625impl VtolTransitionHeading {
4626    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4627}
4628impl Default for VtolTransitionHeading {
4629    fn default() -> Self {
4630        Self::DEFAULT
4631    }
4632}
4633#[cfg_attr(feature = "ts", derive(TS))]
4634#[cfg_attr(feature = "ts", ts(export))]
4635#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4637#[cfg_attr(feature = "serde", serde(tag = "type"))]
4638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4639#[repr(u32)]
4640#[doc = "WiFi Mode."]
4641pub enum WifiConfigApMode {
4642    #[doc = "WiFi mode is undefined."]
4643    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4644    #[doc = "WiFi configured as an access point."]
4645    WIFI_CONFIG_AP_MODE_AP = 1,
4646    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4647    WIFI_CONFIG_AP_MODE_STATION = 2,
4648    #[doc = "WiFi disabled."]
4649    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4650}
4651impl WifiConfigApMode {
4652    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4653}
4654impl Default for WifiConfigApMode {
4655    fn default() -> Self {
4656        Self::DEFAULT
4657    }
4658}
4659#[cfg_attr(feature = "ts", derive(TS))]
4660#[cfg_attr(feature = "ts", ts(export))]
4661#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4663#[cfg_attr(feature = "serde", serde(tag = "type"))]
4664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4665#[repr(u32)]
4666#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4667pub enum WifiConfigApResponse {
4668    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4669    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4670    #[doc = "Changes accepted."]
4671    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4672    #[doc = "Changes rejected."]
4673    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4674    #[doc = "Invalid Mode."]
4675    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4676    #[doc = "Invalid SSID."]
4677    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4678    #[doc = "Invalid Password."]
4679    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4680}
4681impl WifiConfigApResponse {
4682    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4683}
4684impl Default for WifiConfigApResponse {
4685    fn default() -> Self {
4686        Self::DEFAULT
4687    }
4688}
4689#[cfg_attr(feature = "ts", derive(TS))]
4690#[cfg_attr(feature = "ts", ts(export))]
4691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4693#[cfg_attr(feature = "serde", serde(tag = "type"))]
4694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4695#[repr(u32)]
4696#[doc = "Winch actions."]
4697pub enum WinchActions {
4698    #[doc = "Allow motor to freewheel."]
4699    WINCH_RELAXED = 0,
4700    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4701    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4702    #[doc = "Wind or unwind line at specified rate."]
4703    WINCH_RATE_CONTROL = 2,
4704    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4705    WINCH_LOCK = 3,
4706    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4707    WINCH_DELIVER = 4,
4708    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4709    WINCH_HOLD = 5,
4710    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4711    WINCH_RETRACT = 6,
4712    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4713    WINCH_LOAD_LINE = 7,
4714    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4715    WINCH_ABANDON_LINE = 8,
4716    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4717    WINCH_LOAD_PAYLOAD = 9,
4718}
4719impl WinchActions {
4720    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4721}
4722impl Default for WinchActions {
4723    fn default() -> Self {
4724        Self::DEFAULT
4725    }
4726}
4727#[doc = "Set the vehicle attitude and body angular rates."]
4728#[doc = ""]
4729#[doc = "ID: 140"]
4730#[derive(Debug, Clone, PartialEq)]
4731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4733#[cfg_attr(feature = "ts", derive(TS))]
4734#[cfg_attr(feature = "ts", ts(export))]
4735pub struct ACTUATOR_CONTROL_TARGET_DATA {
4736    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4737    pub time_usec: u64,
4738    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4741    pub controls: [f32; 8],
4742    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4743    pub group_mlx: u8,
4744}
4745impl ACTUATOR_CONTROL_TARGET_DATA {
4746    pub const ENCODED_LEN: usize = 41usize;
4747    pub const DEFAULT: Self = Self {
4748        time_usec: 0_u64,
4749        controls: [0.0_f32; 8usize],
4750        group_mlx: 0_u8,
4751    };
4752    #[cfg(feature = "arbitrary")]
4753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4754        use arbitrary::{Arbitrary, Unstructured};
4755        let mut buf = [0u8; 1024];
4756        rng.fill_bytes(&mut buf);
4757        let mut unstructured = Unstructured::new(&buf);
4758        Self::arbitrary(&mut unstructured).unwrap_or_default()
4759    }
4760}
4761impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4762    fn default() -> Self {
4763        Self::DEFAULT.clone()
4764    }
4765}
4766impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4767    type Message = MavMessage;
4768    const ID: u32 = 140u32;
4769    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4770    const EXTRA_CRC: u8 = 181u8;
4771    const ENCODED_LEN: usize = 41usize;
4772    fn deser(
4773        _version: MavlinkVersion,
4774        __input: &[u8],
4775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4776        let avail_len = __input.len();
4777        let mut payload_buf = [0; Self::ENCODED_LEN];
4778        let mut buf = if avail_len < Self::ENCODED_LEN {
4779            payload_buf[0..avail_len].copy_from_slice(__input);
4780            Bytes::new(&payload_buf)
4781        } else {
4782            Bytes::new(__input)
4783        };
4784        let mut __struct = Self::default();
4785        __struct.time_usec = buf.get_u64_le();
4786        for v in &mut __struct.controls {
4787            let val = buf.get_f32_le();
4788            *v = val;
4789        }
4790        __struct.group_mlx = buf.get_u8();
4791        Ok(__struct)
4792    }
4793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4794        let mut __tmp = BytesMut::new(bytes);
4795        #[allow(clippy::absurd_extreme_comparisons)]
4796        #[allow(unused_comparisons)]
4797        if __tmp.remaining() < Self::ENCODED_LEN {
4798            panic!(
4799                "buffer is too small (need {} bytes, but got {})",
4800                Self::ENCODED_LEN,
4801                __tmp.remaining(),
4802            )
4803        }
4804        __tmp.put_u64_le(self.time_usec);
4805        for val in &self.controls {
4806            __tmp.put_f32_le(*val);
4807        }
4808        __tmp.put_u8(self.group_mlx);
4809        if matches!(version, MavlinkVersion::V2) {
4810            let len = __tmp.len();
4811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4812        } else {
4813            __tmp.len()
4814        }
4815    }
4816}
4817#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4818#[doc = ""]
4819#[doc = "ID: 375"]
4820#[derive(Debug, Clone, PartialEq)]
4821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4823#[cfg_attr(feature = "ts", derive(TS))]
4824#[cfg_attr(feature = "ts", ts(export))]
4825pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4826    #[doc = "Timestamp (since system boot)."]
4827    pub time_usec: u64,
4828    #[doc = "Active outputs"]
4829    pub active: u32,
4830    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4833    pub actuator: [f32; 32],
4834}
4835impl ACTUATOR_OUTPUT_STATUS_DATA {
4836    pub const ENCODED_LEN: usize = 140usize;
4837    pub const DEFAULT: Self = Self {
4838        time_usec: 0_u64,
4839        active: 0_u32,
4840        actuator: [0.0_f32; 32usize],
4841    };
4842    #[cfg(feature = "arbitrary")]
4843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4844        use arbitrary::{Arbitrary, Unstructured};
4845        let mut buf = [0u8; 1024];
4846        rng.fill_bytes(&mut buf);
4847        let mut unstructured = Unstructured::new(&buf);
4848        Self::arbitrary(&mut unstructured).unwrap_or_default()
4849    }
4850}
4851impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4852    fn default() -> Self {
4853        Self::DEFAULT.clone()
4854    }
4855}
4856impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4857    type Message = MavMessage;
4858    const ID: u32 = 375u32;
4859    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4860    const EXTRA_CRC: u8 = 251u8;
4861    const ENCODED_LEN: usize = 140usize;
4862    fn deser(
4863        _version: MavlinkVersion,
4864        __input: &[u8],
4865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4866        let avail_len = __input.len();
4867        let mut payload_buf = [0; Self::ENCODED_LEN];
4868        let mut buf = if avail_len < Self::ENCODED_LEN {
4869            payload_buf[0..avail_len].copy_from_slice(__input);
4870            Bytes::new(&payload_buf)
4871        } else {
4872            Bytes::new(__input)
4873        };
4874        let mut __struct = Self::default();
4875        __struct.time_usec = buf.get_u64_le();
4876        __struct.active = buf.get_u32_le();
4877        for v in &mut __struct.actuator {
4878            let val = buf.get_f32_le();
4879            *v = val;
4880        }
4881        Ok(__struct)
4882    }
4883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4884        let mut __tmp = BytesMut::new(bytes);
4885        #[allow(clippy::absurd_extreme_comparisons)]
4886        #[allow(unused_comparisons)]
4887        if __tmp.remaining() < Self::ENCODED_LEN {
4888            panic!(
4889                "buffer is too small (need {} bytes, but got {})",
4890                Self::ENCODED_LEN,
4891                __tmp.remaining(),
4892            )
4893        }
4894        __tmp.put_u64_le(self.time_usec);
4895        __tmp.put_u32_le(self.active);
4896        for val in &self.actuator {
4897            __tmp.put_f32_le(*val);
4898        }
4899        if matches!(version, MavlinkVersion::V2) {
4900            let len = __tmp.len();
4901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4902        } else {
4903            __tmp.len()
4904        }
4905    }
4906}
4907#[doc = "The location and information of an ADSB vehicle."]
4908#[doc = ""]
4909#[doc = "ID: 246"]
4910#[derive(Debug, Clone, PartialEq)]
4911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4913#[cfg_attr(feature = "ts", derive(TS))]
4914#[cfg_attr(feature = "ts", ts(export))]
4915pub struct ADSB_VEHICLE_DATA {
4916    #[doc = "ICAO address"]
4917    pub ICAO_address: u32,
4918    #[doc = "Latitude"]
4919    pub lat: i32,
4920    #[doc = "Longitude"]
4921    pub lon: i32,
4922    #[doc = "Altitude(ASL)"]
4923    pub altitude: i32,
4924    #[doc = "Course over ground"]
4925    pub heading: u16,
4926    #[doc = "The horizontal velocity"]
4927    pub hor_velocity: u16,
4928    #[doc = "The vertical velocity. Positive is up"]
4929    pub ver_velocity: i16,
4930    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4931    pub flags: AdsbFlags,
4932    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4933    pub squawk: u16,
4934    #[doc = "ADSB altitude type."]
4935    pub altitude_type: AdsbAltitudeType,
4936    #[doc = "The callsign, 8+null"]
4937    #[cfg_attr(feature = "ts", ts(type = "string"))]
4938    pub callsign: CharArray<9>,
4939    #[doc = "ADSB emitter type."]
4940    pub emitter_type: AdsbEmitterType,
4941    #[doc = "Time since last communication in seconds"]
4942    pub tslc: u8,
4943}
4944impl ADSB_VEHICLE_DATA {
4945    pub const ENCODED_LEN: usize = 38usize;
4946    pub const DEFAULT: Self = Self {
4947        ICAO_address: 0_u32,
4948        lat: 0_i32,
4949        lon: 0_i32,
4950        altitude: 0_i32,
4951        heading: 0_u16,
4952        hor_velocity: 0_u16,
4953        ver_velocity: 0_i16,
4954        flags: AdsbFlags::DEFAULT,
4955        squawk: 0_u16,
4956        altitude_type: AdsbAltitudeType::DEFAULT,
4957        callsign: CharArray::new([0_u8; 9usize]),
4958        emitter_type: AdsbEmitterType::DEFAULT,
4959        tslc: 0_u8,
4960    };
4961    #[cfg(feature = "arbitrary")]
4962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4963        use arbitrary::{Arbitrary, Unstructured};
4964        let mut buf = [0u8; 1024];
4965        rng.fill_bytes(&mut buf);
4966        let mut unstructured = Unstructured::new(&buf);
4967        Self::arbitrary(&mut unstructured).unwrap_or_default()
4968    }
4969}
4970impl Default for ADSB_VEHICLE_DATA {
4971    fn default() -> Self {
4972        Self::DEFAULT.clone()
4973    }
4974}
4975impl MessageData for ADSB_VEHICLE_DATA {
4976    type Message = MavMessage;
4977    const ID: u32 = 246u32;
4978    const NAME: &'static str = "ADSB_VEHICLE";
4979    const EXTRA_CRC: u8 = 184u8;
4980    const ENCODED_LEN: usize = 38usize;
4981    fn deser(
4982        _version: MavlinkVersion,
4983        __input: &[u8],
4984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4985        let avail_len = __input.len();
4986        let mut payload_buf = [0; Self::ENCODED_LEN];
4987        let mut buf = if avail_len < Self::ENCODED_LEN {
4988            payload_buf[0..avail_len].copy_from_slice(__input);
4989            Bytes::new(&payload_buf)
4990        } else {
4991            Bytes::new(__input)
4992        };
4993        let mut __struct = Self::default();
4994        __struct.ICAO_address = buf.get_u32_le();
4995        __struct.lat = buf.get_i32_le();
4996        __struct.lon = buf.get_i32_le();
4997        __struct.altitude = buf.get_i32_le();
4998        __struct.heading = buf.get_u16_le();
4999        __struct.hor_velocity = buf.get_u16_le();
5000        __struct.ver_velocity = buf.get_i16_le();
5001        let tmp = buf.get_u16_le();
5002        __struct.flags =
5003            AdsbFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5004                flag_type: "AdsbFlags",
5005                value: tmp as u64,
5006            })?;
5007        __struct.squawk = buf.get_u16_le();
5008        let tmp = buf.get_u8();
5009        __struct.altitude_type =
5010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5011                enum_type: "AdsbAltitudeType",
5012                value: tmp as u64,
5013            })?;
5014        let mut tmp = [0_u8; 9usize];
5015        for v in &mut tmp {
5016            *v = buf.get_u8();
5017        }
5018        __struct.callsign = CharArray::new(tmp);
5019        let tmp = buf.get_u8();
5020        __struct.emitter_type =
5021            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5022                enum_type: "AdsbEmitterType",
5023                value: tmp as u64,
5024            })?;
5025        __struct.tslc = buf.get_u8();
5026        Ok(__struct)
5027    }
5028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5029        let mut __tmp = BytesMut::new(bytes);
5030        #[allow(clippy::absurd_extreme_comparisons)]
5031        #[allow(unused_comparisons)]
5032        if __tmp.remaining() < Self::ENCODED_LEN {
5033            panic!(
5034                "buffer is too small (need {} bytes, but got {})",
5035                Self::ENCODED_LEN,
5036                __tmp.remaining(),
5037            )
5038        }
5039        __tmp.put_u32_le(self.ICAO_address);
5040        __tmp.put_i32_le(self.lat);
5041        __tmp.put_i32_le(self.lon);
5042        __tmp.put_i32_le(self.altitude);
5043        __tmp.put_u16_le(self.heading);
5044        __tmp.put_u16_le(self.hor_velocity);
5045        __tmp.put_i16_le(self.ver_velocity);
5046        __tmp.put_u16_le(self.flags.bits());
5047        __tmp.put_u16_le(self.squawk);
5048        __tmp.put_u8(self.altitude_type as u8);
5049        for val in &self.callsign {
5050            __tmp.put_u8(*val);
5051        }
5052        __tmp.put_u8(self.emitter_type as u8);
5053        __tmp.put_u8(self.tslc);
5054        if matches!(version, MavlinkVersion::V2) {
5055            let len = __tmp.len();
5056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5057        } else {
5058            __tmp.len()
5059        }
5060    }
5061}
5062#[doc = "The location and information of an AIS vessel."]
5063#[doc = ""]
5064#[doc = "ID: 301"]
5065#[derive(Debug, Clone, PartialEq)]
5066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5068#[cfg_attr(feature = "ts", derive(TS))]
5069#[cfg_attr(feature = "ts", ts(export))]
5070pub struct AIS_VESSEL_DATA {
5071    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5072    pub MMSI: u32,
5073    #[doc = "Latitude"]
5074    pub lat: i32,
5075    #[doc = "Longitude"]
5076    pub lon: i32,
5077    #[doc = "Course over ground"]
5078    pub COG: u16,
5079    #[doc = "True heading"]
5080    pub heading: u16,
5081    #[doc = "Speed over ground"]
5082    pub velocity: u16,
5083    #[doc = "Distance from lat/lon location to bow"]
5084    pub dimension_bow: u16,
5085    #[doc = "Distance from lat/lon location to stern"]
5086    pub dimension_stern: u16,
5087    #[doc = "Time since last communication in seconds"]
5088    pub tslc: u16,
5089    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5090    pub flags: AisFlags,
5091    #[doc = "Turn rate"]
5092    pub turn_rate: i8,
5093    #[doc = "Navigational status"]
5094    pub navigational_status: AisNavStatus,
5095    #[doc = "Type of vessels"]
5096    pub mavtype: AisType,
5097    #[doc = "Distance from lat/lon location to port side"]
5098    pub dimension_port: u8,
5099    #[doc = "Distance from lat/lon location to starboard side"]
5100    pub dimension_starboard: u8,
5101    #[doc = "The vessel callsign"]
5102    #[cfg_attr(feature = "ts", ts(type = "string"))]
5103    pub callsign: CharArray<7>,
5104    #[doc = "The vessel name"]
5105    #[cfg_attr(feature = "ts", ts(type = "string"))]
5106    pub name: CharArray<20>,
5107}
5108impl AIS_VESSEL_DATA {
5109    pub const ENCODED_LEN: usize = 58usize;
5110    pub const DEFAULT: Self = Self {
5111        MMSI: 0_u32,
5112        lat: 0_i32,
5113        lon: 0_i32,
5114        COG: 0_u16,
5115        heading: 0_u16,
5116        velocity: 0_u16,
5117        dimension_bow: 0_u16,
5118        dimension_stern: 0_u16,
5119        tslc: 0_u16,
5120        flags: AisFlags::DEFAULT,
5121        turn_rate: 0_i8,
5122        navigational_status: AisNavStatus::DEFAULT,
5123        mavtype: AisType::DEFAULT,
5124        dimension_port: 0_u8,
5125        dimension_starboard: 0_u8,
5126        callsign: CharArray::new([0_u8; 7usize]),
5127        name: CharArray::new([0_u8; 20usize]),
5128    };
5129    #[cfg(feature = "arbitrary")]
5130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5131        use arbitrary::{Arbitrary, Unstructured};
5132        let mut buf = [0u8; 1024];
5133        rng.fill_bytes(&mut buf);
5134        let mut unstructured = Unstructured::new(&buf);
5135        Self::arbitrary(&mut unstructured).unwrap_or_default()
5136    }
5137}
5138impl Default for AIS_VESSEL_DATA {
5139    fn default() -> Self {
5140        Self::DEFAULT.clone()
5141    }
5142}
5143impl MessageData for AIS_VESSEL_DATA {
5144    type Message = MavMessage;
5145    const ID: u32 = 301u32;
5146    const NAME: &'static str = "AIS_VESSEL";
5147    const EXTRA_CRC: u8 = 243u8;
5148    const ENCODED_LEN: usize = 58usize;
5149    fn deser(
5150        _version: MavlinkVersion,
5151        __input: &[u8],
5152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5153        let avail_len = __input.len();
5154        let mut payload_buf = [0; Self::ENCODED_LEN];
5155        let mut buf = if avail_len < Self::ENCODED_LEN {
5156            payload_buf[0..avail_len].copy_from_slice(__input);
5157            Bytes::new(&payload_buf)
5158        } else {
5159            Bytes::new(__input)
5160        };
5161        let mut __struct = Self::default();
5162        __struct.MMSI = buf.get_u32_le();
5163        __struct.lat = buf.get_i32_le();
5164        __struct.lon = buf.get_i32_le();
5165        __struct.COG = buf.get_u16_le();
5166        __struct.heading = buf.get_u16_le();
5167        __struct.velocity = buf.get_u16_le();
5168        __struct.dimension_bow = buf.get_u16_le();
5169        __struct.dimension_stern = buf.get_u16_le();
5170        __struct.tslc = buf.get_u16_le();
5171        let tmp = buf.get_u16_le();
5172        __struct.flags =
5173            AisFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5174                flag_type: "AisFlags",
5175                value: tmp as u64,
5176            })?;
5177        __struct.turn_rate = buf.get_i8();
5178        let tmp = buf.get_u8();
5179        __struct.navigational_status =
5180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5181                enum_type: "AisNavStatus",
5182                value: tmp as u64,
5183            })?;
5184        let tmp = buf.get_u8();
5185        __struct.mavtype =
5186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5187                enum_type: "AisType",
5188                value: tmp as u64,
5189            })?;
5190        __struct.dimension_port = buf.get_u8();
5191        __struct.dimension_starboard = buf.get_u8();
5192        let mut tmp = [0_u8; 7usize];
5193        for v in &mut tmp {
5194            *v = buf.get_u8();
5195        }
5196        __struct.callsign = CharArray::new(tmp);
5197        let mut tmp = [0_u8; 20usize];
5198        for v in &mut tmp {
5199            *v = buf.get_u8();
5200        }
5201        __struct.name = CharArray::new(tmp);
5202        Ok(__struct)
5203    }
5204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5205        let mut __tmp = BytesMut::new(bytes);
5206        #[allow(clippy::absurd_extreme_comparisons)]
5207        #[allow(unused_comparisons)]
5208        if __tmp.remaining() < Self::ENCODED_LEN {
5209            panic!(
5210                "buffer is too small (need {} bytes, but got {})",
5211                Self::ENCODED_LEN,
5212                __tmp.remaining(),
5213            )
5214        }
5215        __tmp.put_u32_le(self.MMSI);
5216        __tmp.put_i32_le(self.lat);
5217        __tmp.put_i32_le(self.lon);
5218        __tmp.put_u16_le(self.COG);
5219        __tmp.put_u16_le(self.heading);
5220        __tmp.put_u16_le(self.velocity);
5221        __tmp.put_u16_le(self.dimension_bow);
5222        __tmp.put_u16_le(self.dimension_stern);
5223        __tmp.put_u16_le(self.tslc);
5224        __tmp.put_u16_le(self.flags.bits());
5225        __tmp.put_i8(self.turn_rate);
5226        __tmp.put_u8(self.navigational_status as u8);
5227        __tmp.put_u8(self.mavtype as u8);
5228        __tmp.put_u8(self.dimension_port);
5229        __tmp.put_u8(self.dimension_starboard);
5230        for val in &self.callsign {
5231            __tmp.put_u8(*val);
5232        }
5233        for val in &self.name {
5234            __tmp.put_u8(*val);
5235        }
5236        if matches!(version, MavlinkVersion::V2) {
5237            let len = __tmp.len();
5238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5239        } else {
5240            __tmp.len()
5241        }
5242    }
5243}
5244#[doc = "The current system altitude."]
5245#[doc = ""]
5246#[doc = "ID: 141"]
5247#[derive(Debug, Clone, PartialEq)]
5248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5250#[cfg_attr(feature = "ts", derive(TS))]
5251#[cfg_attr(feature = "ts", ts(export))]
5252pub struct ALTITUDE_DATA {
5253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5254    pub time_usec: u64,
5255    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5256    pub altitude_monotonic: f32,
5257    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5258    pub altitude_amsl: f32,
5259    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5260    pub altitude_local: f32,
5261    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5262    pub altitude_relative: f32,
5263    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5264    pub altitude_terrain: f32,
5265    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5266    pub bottom_clearance: f32,
5267}
5268impl ALTITUDE_DATA {
5269    pub const ENCODED_LEN: usize = 32usize;
5270    pub const DEFAULT: Self = Self {
5271        time_usec: 0_u64,
5272        altitude_monotonic: 0.0_f32,
5273        altitude_amsl: 0.0_f32,
5274        altitude_local: 0.0_f32,
5275        altitude_relative: 0.0_f32,
5276        altitude_terrain: 0.0_f32,
5277        bottom_clearance: 0.0_f32,
5278    };
5279    #[cfg(feature = "arbitrary")]
5280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5281        use arbitrary::{Arbitrary, Unstructured};
5282        let mut buf = [0u8; 1024];
5283        rng.fill_bytes(&mut buf);
5284        let mut unstructured = Unstructured::new(&buf);
5285        Self::arbitrary(&mut unstructured).unwrap_or_default()
5286    }
5287}
5288impl Default for ALTITUDE_DATA {
5289    fn default() -> Self {
5290        Self::DEFAULT.clone()
5291    }
5292}
5293impl MessageData for ALTITUDE_DATA {
5294    type Message = MavMessage;
5295    const ID: u32 = 141u32;
5296    const NAME: &'static str = "ALTITUDE";
5297    const EXTRA_CRC: u8 = 47u8;
5298    const ENCODED_LEN: usize = 32usize;
5299    fn deser(
5300        _version: MavlinkVersion,
5301        __input: &[u8],
5302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5303        let avail_len = __input.len();
5304        let mut payload_buf = [0; Self::ENCODED_LEN];
5305        let mut buf = if avail_len < Self::ENCODED_LEN {
5306            payload_buf[0..avail_len].copy_from_slice(__input);
5307            Bytes::new(&payload_buf)
5308        } else {
5309            Bytes::new(__input)
5310        };
5311        let mut __struct = Self::default();
5312        __struct.time_usec = buf.get_u64_le();
5313        __struct.altitude_monotonic = buf.get_f32_le();
5314        __struct.altitude_amsl = buf.get_f32_le();
5315        __struct.altitude_local = buf.get_f32_le();
5316        __struct.altitude_relative = buf.get_f32_le();
5317        __struct.altitude_terrain = buf.get_f32_le();
5318        __struct.bottom_clearance = buf.get_f32_le();
5319        Ok(__struct)
5320    }
5321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5322        let mut __tmp = BytesMut::new(bytes);
5323        #[allow(clippy::absurd_extreme_comparisons)]
5324        #[allow(unused_comparisons)]
5325        if __tmp.remaining() < Self::ENCODED_LEN {
5326            panic!(
5327                "buffer is too small (need {} bytes, but got {})",
5328                Self::ENCODED_LEN,
5329                __tmp.remaining(),
5330            )
5331        }
5332        __tmp.put_u64_le(self.time_usec);
5333        __tmp.put_f32_le(self.altitude_monotonic);
5334        __tmp.put_f32_le(self.altitude_amsl);
5335        __tmp.put_f32_le(self.altitude_local);
5336        __tmp.put_f32_le(self.altitude_relative);
5337        __tmp.put_f32_le(self.altitude_terrain);
5338        __tmp.put_f32_le(self.bottom_clearance);
5339        if matches!(version, MavlinkVersion::V2) {
5340            let len = __tmp.len();
5341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5342        } else {
5343            __tmp.len()
5344        }
5345    }
5346}
5347#[doc = "ASL-fixed-wing controller data."]
5348#[doc = ""]
5349#[doc = "ID: 8004"]
5350#[derive(Debug, Clone, PartialEq)]
5351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5353#[cfg_attr(feature = "ts", derive(TS))]
5354#[cfg_attr(feature = "ts", ts(export))]
5355pub struct ASLCTRL_DATA_DATA {
5356    #[doc = "Timestamp"]
5357    pub timestamp: u64,
5358    #[doc = "See sourcecode for a description of these values..."]
5359    pub h: f32,
5360    pub hRef: f32,
5361    pub hRef_t: f32,
5362    #[doc = "Pitch angle"]
5363    pub PitchAngle: f32,
5364    #[doc = "Pitch angle reference"]
5365    pub PitchAngleRef: f32,
5366    pub q: f32,
5367    pub qRef: f32,
5368    pub uElev: f32,
5369    pub uThrot: f32,
5370    pub uThrot2: f32,
5371    pub nZ: f32,
5372    #[doc = "Airspeed reference"]
5373    pub AirspeedRef: f32,
5374    #[doc = "Yaw angle"]
5375    pub YawAngle: f32,
5376    #[doc = "Yaw angle reference"]
5377    pub YawAngleRef: f32,
5378    #[doc = "Roll angle"]
5379    pub RollAngle: f32,
5380    #[doc = "Roll angle reference"]
5381    pub RollAngleRef: f32,
5382    pub p: f32,
5383    pub pRef: f32,
5384    pub r: f32,
5385    pub rRef: f32,
5386    pub uAil: f32,
5387    pub uRud: f32,
5388    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
5389    pub aslctrl_mode: u8,
5390    pub SpoilersEngaged: u8,
5391}
5392impl ASLCTRL_DATA_DATA {
5393    pub const ENCODED_LEN: usize = 98usize;
5394    pub const DEFAULT: Self = Self {
5395        timestamp: 0_u64,
5396        h: 0.0_f32,
5397        hRef: 0.0_f32,
5398        hRef_t: 0.0_f32,
5399        PitchAngle: 0.0_f32,
5400        PitchAngleRef: 0.0_f32,
5401        q: 0.0_f32,
5402        qRef: 0.0_f32,
5403        uElev: 0.0_f32,
5404        uThrot: 0.0_f32,
5405        uThrot2: 0.0_f32,
5406        nZ: 0.0_f32,
5407        AirspeedRef: 0.0_f32,
5408        YawAngle: 0.0_f32,
5409        YawAngleRef: 0.0_f32,
5410        RollAngle: 0.0_f32,
5411        RollAngleRef: 0.0_f32,
5412        p: 0.0_f32,
5413        pRef: 0.0_f32,
5414        r: 0.0_f32,
5415        rRef: 0.0_f32,
5416        uAil: 0.0_f32,
5417        uRud: 0.0_f32,
5418        aslctrl_mode: 0_u8,
5419        SpoilersEngaged: 0_u8,
5420    };
5421    #[cfg(feature = "arbitrary")]
5422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5423        use arbitrary::{Arbitrary, Unstructured};
5424        let mut buf = [0u8; 1024];
5425        rng.fill_bytes(&mut buf);
5426        let mut unstructured = Unstructured::new(&buf);
5427        Self::arbitrary(&mut unstructured).unwrap_or_default()
5428    }
5429}
5430impl Default for ASLCTRL_DATA_DATA {
5431    fn default() -> Self {
5432        Self::DEFAULT.clone()
5433    }
5434}
5435impl MessageData for ASLCTRL_DATA_DATA {
5436    type Message = MavMessage;
5437    const ID: u32 = 8004u32;
5438    const NAME: &'static str = "ASLCTRL_DATA";
5439    const EXTRA_CRC: u8 = 172u8;
5440    const ENCODED_LEN: usize = 98usize;
5441    fn deser(
5442        _version: MavlinkVersion,
5443        __input: &[u8],
5444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5445        let avail_len = __input.len();
5446        let mut payload_buf = [0; Self::ENCODED_LEN];
5447        let mut buf = if avail_len < Self::ENCODED_LEN {
5448            payload_buf[0..avail_len].copy_from_slice(__input);
5449            Bytes::new(&payload_buf)
5450        } else {
5451            Bytes::new(__input)
5452        };
5453        let mut __struct = Self::default();
5454        __struct.timestamp = buf.get_u64_le();
5455        __struct.h = buf.get_f32_le();
5456        __struct.hRef = buf.get_f32_le();
5457        __struct.hRef_t = buf.get_f32_le();
5458        __struct.PitchAngle = buf.get_f32_le();
5459        __struct.PitchAngleRef = buf.get_f32_le();
5460        __struct.q = buf.get_f32_le();
5461        __struct.qRef = buf.get_f32_le();
5462        __struct.uElev = buf.get_f32_le();
5463        __struct.uThrot = buf.get_f32_le();
5464        __struct.uThrot2 = buf.get_f32_le();
5465        __struct.nZ = buf.get_f32_le();
5466        __struct.AirspeedRef = buf.get_f32_le();
5467        __struct.YawAngle = buf.get_f32_le();
5468        __struct.YawAngleRef = buf.get_f32_le();
5469        __struct.RollAngle = buf.get_f32_le();
5470        __struct.RollAngleRef = buf.get_f32_le();
5471        __struct.p = buf.get_f32_le();
5472        __struct.pRef = buf.get_f32_le();
5473        __struct.r = buf.get_f32_le();
5474        __struct.rRef = buf.get_f32_le();
5475        __struct.uAil = buf.get_f32_le();
5476        __struct.uRud = buf.get_f32_le();
5477        __struct.aslctrl_mode = buf.get_u8();
5478        __struct.SpoilersEngaged = buf.get_u8();
5479        Ok(__struct)
5480    }
5481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5482        let mut __tmp = BytesMut::new(bytes);
5483        #[allow(clippy::absurd_extreme_comparisons)]
5484        #[allow(unused_comparisons)]
5485        if __tmp.remaining() < Self::ENCODED_LEN {
5486            panic!(
5487                "buffer is too small (need {} bytes, but got {})",
5488                Self::ENCODED_LEN,
5489                __tmp.remaining(),
5490            )
5491        }
5492        __tmp.put_u64_le(self.timestamp);
5493        __tmp.put_f32_le(self.h);
5494        __tmp.put_f32_le(self.hRef);
5495        __tmp.put_f32_le(self.hRef_t);
5496        __tmp.put_f32_le(self.PitchAngle);
5497        __tmp.put_f32_le(self.PitchAngleRef);
5498        __tmp.put_f32_le(self.q);
5499        __tmp.put_f32_le(self.qRef);
5500        __tmp.put_f32_le(self.uElev);
5501        __tmp.put_f32_le(self.uThrot);
5502        __tmp.put_f32_le(self.uThrot2);
5503        __tmp.put_f32_le(self.nZ);
5504        __tmp.put_f32_le(self.AirspeedRef);
5505        __tmp.put_f32_le(self.YawAngle);
5506        __tmp.put_f32_le(self.YawAngleRef);
5507        __tmp.put_f32_le(self.RollAngle);
5508        __tmp.put_f32_le(self.RollAngleRef);
5509        __tmp.put_f32_le(self.p);
5510        __tmp.put_f32_le(self.pRef);
5511        __tmp.put_f32_le(self.r);
5512        __tmp.put_f32_le(self.rRef);
5513        __tmp.put_f32_le(self.uAil);
5514        __tmp.put_f32_le(self.uRud);
5515        __tmp.put_u8(self.aslctrl_mode);
5516        __tmp.put_u8(self.SpoilersEngaged);
5517        if matches!(version, MavlinkVersion::V2) {
5518            let len = __tmp.len();
5519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5520        } else {
5521            __tmp.len()
5522        }
5523    }
5524}
5525#[doc = "ASL-fixed-wing controller debug data."]
5526#[doc = ""]
5527#[doc = "ID: 8005"]
5528#[derive(Debug, Clone, PartialEq)]
5529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5531#[cfg_attr(feature = "ts", derive(TS))]
5532#[cfg_attr(feature = "ts", ts(export))]
5533pub struct ASLCTRL_DEBUG_DATA {
5534    #[doc = "Debug data"]
5535    pub i32_1: u32,
5536    #[doc = "Debug data"]
5537    pub f_1: f32,
5538    #[doc = "Debug data"]
5539    pub f_2: f32,
5540    #[doc = "Debug data"]
5541    pub f_3: f32,
5542    #[doc = "Debug data"]
5543    pub f_4: f32,
5544    #[doc = "Debug data"]
5545    pub f_5: f32,
5546    #[doc = "Debug data"]
5547    pub f_6: f32,
5548    #[doc = "Debug data"]
5549    pub f_7: f32,
5550    #[doc = "Debug data"]
5551    pub f_8: f32,
5552    #[doc = "Debug data"]
5553    pub i8_1: u8,
5554    #[doc = "Debug data"]
5555    pub i8_2: u8,
5556}
5557impl ASLCTRL_DEBUG_DATA {
5558    pub const ENCODED_LEN: usize = 38usize;
5559    pub const DEFAULT: Self = Self {
5560        i32_1: 0_u32,
5561        f_1: 0.0_f32,
5562        f_2: 0.0_f32,
5563        f_3: 0.0_f32,
5564        f_4: 0.0_f32,
5565        f_5: 0.0_f32,
5566        f_6: 0.0_f32,
5567        f_7: 0.0_f32,
5568        f_8: 0.0_f32,
5569        i8_1: 0_u8,
5570        i8_2: 0_u8,
5571    };
5572    #[cfg(feature = "arbitrary")]
5573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5574        use arbitrary::{Arbitrary, Unstructured};
5575        let mut buf = [0u8; 1024];
5576        rng.fill_bytes(&mut buf);
5577        let mut unstructured = Unstructured::new(&buf);
5578        Self::arbitrary(&mut unstructured).unwrap_or_default()
5579    }
5580}
5581impl Default for ASLCTRL_DEBUG_DATA {
5582    fn default() -> Self {
5583        Self::DEFAULT.clone()
5584    }
5585}
5586impl MessageData for ASLCTRL_DEBUG_DATA {
5587    type Message = MavMessage;
5588    const ID: u32 = 8005u32;
5589    const NAME: &'static str = "ASLCTRL_DEBUG";
5590    const EXTRA_CRC: u8 = 251u8;
5591    const ENCODED_LEN: usize = 38usize;
5592    fn deser(
5593        _version: MavlinkVersion,
5594        __input: &[u8],
5595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5596        let avail_len = __input.len();
5597        let mut payload_buf = [0; Self::ENCODED_LEN];
5598        let mut buf = if avail_len < Self::ENCODED_LEN {
5599            payload_buf[0..avail_len].copy_from_slice(__input);
5600            Bytes::new(&payload_buf)
5601        } else {
5602            Bytes::new(__input)
5603        };
5604        let mut __struct = Self::default();
5605        __struct.i32_1 = buf.get_u32_le();
5606        __struct.f_1 = buf.get_f32_le();
5607        __struct.f_2 = buf.get_f32_le();
5608        __struct.f_3 = buf.get_f32_le();
5609        __struct.f_4 = buf.get_f32_le();
5610        __struct.f_5 = buf.get_f32_le();
5611        __struct.f_6 = buf.get_f32_le();
5612        __struct.f_7 = buf.get_f32_le();
5613        __struct.f_8 = buf.get_f32_le();
5614        __struct.i8_1 = buf.get_u8();
5615        __struct.i8_2 = buf.get_u8();
5616        Ok(__struct)
5617    }
5618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5619        let mut __tmp = BytesMut::new(bytes);
5620        #[allow(clippy::absurd_extreme_comparisons)]
5621        #[allow(unused_comparisons)]
5622        if __tmp.remaining() < Self::ENCODED_LEN {
5623            panic!(
5624                "buffer is too small (need {} bytes, but got {})",
5625                Self::ENCODED_LEN,
5626                __tmp.remaining(),
5627            )
5628        }
5629        __tmp.put_u32_le(self.i32_1);
5630        __tmp.put_f32_le(self.f_1);
5631        __tmp.put_f32_le(self.f_2);
5632        __tmp.put_f32_le(self.f_3);
5633        __tmp.put_f32_le(self.f_4);
5634        __tmp.put_f32_le(self.f_5);
5635        __tmp.put_f32_le(self.f_6);
5636        __tmp.put_f32_le(self.f_7);
5637        __tmp.put_f32_le(self.f_8);
5638        __tmp.put_u8(self.i8_1);
5639        __tmp.put_u8(self.i8_2);
5640        if matches!(version, MavlinkVersion::V2) {
5641            let len = __tmp.len();
5642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5643        } else {
5644            __tmp.len()
5645        }
5646    }
5647}
5648#[doc = "Extended state information for ASLUAVs."]
5649#[doc = ""]
5650#[doc = "ID: 8006"]
5651#[derive(Debug, Clone, PartialEq)]
5652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5654#[cfg_attr(feature = "ts", derive(TS))]
5655#[cfg_attr(feature = "ts", ts(export))]
5656pub struct ASLUAV_STATUS_DATA {
5657    #[doc = "Motor RPM"]
5658    pub Motor_rpm: f32,
5659    #[doc = "Status of the position-indicator LEDs"]
5660    pub LED_status: u8,
5661    #[doc = "Status of the IRIDIUM satellite communication system"]
5662    pub SATCOM_status: u8,
5663    #[doc = "Status vector for up to 8 servos"]
5664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5666    pub Servo_status: [u8; 8],
5667}
5668impl ASLUAV_STATUS_DATA {
5669    pub const ENCODED_LEN: usize = 14usize;
5670    pub const DEFAULT: Self = Self {
5671        Motor_rpm: 0.0_f32,
5672        LED_status: 0_u8,
5673        SATCOM_status: 0_u8,
5674        Servo_status: [0_u8; 8usize],
5675    };
5676    #[cfg(feature = "arbitrary")]
5677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5678        use arbitrary::{Arbitrary, Unstructured};
5679        let mut buf = [0u8; 1024];
5680        rng.fill_bytes(&mut buf);
5681        let mut unstructured = Unstructured::new(&buf);
5682        Self::arbitrary(&mut unstructured).unwrap_or_default()
5683    }
5684}
5685impl Default for ASLUAV_STATUS_DATA {
5686    fn default() -> Self {
5687        Self::DEFAULT.clone()
5688    }
5689}
5690impl MessageData for ASLUAV_STATUS_DATA {
5691    type Message = MavMessage;
5692    const ID: u32 = 8006u32;
5693    const NAME: &'static str = "ASLUAV_STATUS";
5694    const EXTRA_CRC: u8 = 97u8;
5695    const ENCODED_LEN: usize = 14usize;
5696    fn deser(
5697        _version: MavlinkVersion,
5698        __input: &[u8],
5699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5700        let avail_len = __input.len();
5701        let mut payload_buf = [0; Self::ENCODED_LEN];
5702        let mut buf = if avail_len < Self::ENCODED_LEN {
5703            payload_buf[0..avail_len].copy_from_slice(__input);
5704            Bytes::new(&payload_buf)
5705        } else {
5706            Bytes::new(__input)
5707        };
5708        let mut __struct = Self::default();
5709        __struct.Motor_rpm = buf.get_f32_le();
5710        __struct.LED_status = buf.get_u8();
5711        __struct.SATCOM_status = buf.get_u8();
5712        for v in &mut __struct.Servo_status {
5713            let val = buf.get_u8();
5714            *v = val;
5715        }
5716        Ok(__struct)
5717    }
5718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5719        let mut __tmp = BytesMut::new(bytes);
5720        #[allow(clippy::absurd_extreme_comparisons)]
5721        #[allow(unused_comparisons)]
5722        if __tmp.remaining() < Self::ENCODED_LEN {
5723            panic!(
5724                "buffer is too small (need {} bytes, but got {})",
5725                Self::ENCODED_LEN,
5726                __tmp.remaining(),
5727            )
5728        }
5729        __tmp.put_f32_le(self.Motor_rpm);
5730        __tmp.put_u8(self.LED_status);
5731        __tmp.put_u8(self.SATCOM_status);
5732        for val in &self.Servo_status {
5733            __tmp.put_u8(*val);
5734        }
5735        if matches!(version, MavlinkVersion::V2) {
5736            let len = __tmp.len();
5737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5738        } else {
5739            __tmp.len()
5740        }
5741    }
5742}
5743#[doc = "Off-board controls/commands for ASLUAVs."]
5744#[doc = ""]
5745#[doc = "ID: 8008"]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749#[cfg_attr(feature = "ts", derive(TS))]
5750#[cfg_attr(feature = "ts", ts(export))]
5751pub struct ASL_OBCTRL_DATA {
5752    #[doc = "Time since system start"]
5753    pub timestamp: u64,
5754    #[doc = "Elevator command [~]"]
5755    pub uElev: f32,
5756    #[doc = "Throttle command [~]"]
5757    pub uThrot: f32,
5758    #[doc = "Throttle 2 command [~]"]
5759    pub uThrot2: f32,
5760    #[doc = "Left aileron command [~]"]
5761    pub uAilL: f32,
5762    #[doc = "Right aileron command [~]"]
5763    pub uAilR: f32,
5764    #[doc = "Rudder command [~]"]
5765    pub uRud: f32,
5766    #[doc = "Off-board computer status"]
5767    pub obctrl_status: u8,
5768}
5769impl ASL_OBCTRL_DATA {
5770    pub const ENCODED_LEN: usize = 33usize;
5771    pub const DEFAULT: Self = Self {
5772        timestamp: 0_u64,
5773        uElev: 0.0_f32,
5774        uThrot: 0.0_f32,
5775        uThrot2: 0.0_f32,
5776        uAilL: 0.0_f32,
5777        uAilR: 0.0_f32,
5778        uRud: 0.0_f32,
5779        obctrl_status: 0_u8,
5780    };
5781    #[cfg(feature = "arbitrary")]
5782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5783        use arbitrary::{Arbitrary, Unstructured};
5784        let mut buf = [0u8; 1024];
5785        rng.fill_bytes(&mut buf);
5786        let mut unstructured = Unstructured::new(&buf);
5787        Self::arbitrary(&mut unstructured).unwrap_or_default()
5788    }
5789}
5790impl Default for ASL_OBCTRL_DATA {
5791    fn default() -> Self {
5792        Self::DEFAULT.clone()
5793    }
5794}
5795impl MessageData for ASL_OBCTRL_DATA {
5796    type Message = MavMessage;
5797    const ID: u32 = 8008u32;
5798    const NAME: &'static str = "ASL_OBCTRL";
5799    const EXTRA_CRC: u8 = 234u8;
5800    const ENCODED_LEN: usize = 33usize;
5801    fn deser(
5802        _version: MavlinkVersion,
5803        __input: &[u8],
5804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5805        let avail_len = __input.len();
5806        let mut payload_buf = [0; Self::ENCODED_LEN];
5807        let mut buf = if avail_len < Self::ENCODED_LEN {
5808            payload_buf[0..avail_len].copy_from_slice(__input);
5809            Bytes::new(&payload_buf)
5810        } else {
5811            Bytes::new(__input)
5812        };
5813        let mut __struct = Self::default();
5814        __struct.timestamp = buf.get_u64_le();
5815        __struct.uElev = buf.get_f32_le();
5816        __struct.uThrot = buf.get_f32_le();
5817        __struct.uThrot2 = buf.get_f32_le();
5818        __struct.uAilL = buf.get_f32_le();
5819        __struct.uAilR = buf.get_f32_le();
5820        __struct.uRud = buf.get_f32_le();
5821        __struct.obctrl_status = buf.get_u8();
5822        Ok(__struct)
5823    }
5824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5825        let mut __tmp = BytesMut::new(bytes);
5826        #[allow(clippy::absurd_extreme_comparisons)]
5827        #[allow(unused_comparisons)]
5828        if __tmp.remaining() < Self::ENCODED_LEN {
5829            panic!(
5830                "buffer is too small (need {} bytes, but got {})",
5831                Self::ENCODED_LEN,
5832                __tmp.remaining(),
5833            )
5834        }
5835        __tmp.put_u64_le(self.timestamp);
5836        __tmp.put_f32_le(self.uElev);
5837        __tmp.put_f32_le(self.uThrot);
5838        __tmp.put_f32_le(self.uThrot2);
5839        __tmp.put_f32_le(self.uAilL);
5840        __tmp.put_f32_le(self.uAilR);
5841        __tmp.put_f32_le(self.uRud);
5842        __tmp.put_u8(self.obctrl_status);
5843        if matches!(version, MavlinkVersion::V2) {
5844            let len = __tmp.len();
5845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5846        } else {
5847            __tmp.len()
5848        }
5849    }
5850}
5851#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5852#[doc = ""]
5853#[doc = "ID: 30"]
5854#[derive(Debug, Clone, PartialEq)]
5855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5857#[cfg_attr(feature = "ts", derive(TS))]
5858#[cfg_attr(feature = "ts", ts(export))]
5859pub struct ATTITUDE_DATA {
5860    #[doc = "Timestamp (time since system boot)."]
5861    pub time_boot_ms: u32,
5862    #[doc = "Roll angle (-pi..+pi)"]
5863    pub roll: f32,
5864    #[doc = "Pitch angle (-pi..+pi)"]
5865    pub pitch: f32,
5866    #[doc = "Yaw angle (-pi..+pi)"]
5867    pub yaw: f32,
5868    #[doc = "Roll angular speed"]
5869    pub rollspeed: f32,
5870    #[doc = "Pitch angular speed"]
5871    pub pitchspeed: f32,
5872    #[doc = "Yaw angular speed"]
5873    pub yawspeed: f32,
5874}
5875impl ATTITUDE_DATA {
5876    pub const ENCODED_LEN: usize = 28usize;
5877    pub const DEFAULT: Self = Self {
5878        time_boot_ms: 0_u32,
5879        roll: 0.0_f32,
5880        pitch: 0.0_f32,
5881        yaw: 0.0_f32,
5882        rollspeed: 0.0_f32,
5883        pitchspeed: 0.0_f32,
5884        yawspeed: 0.0_f32,
5885    };
5886    #[cfg(feature = "arbitrary")]
5887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5888        use arbitrary::{Arbitrary, Unstructured};
5889        let mut buf = [0u8; 1024];
5890        rng.fill_bytes(&mut buf);
5891        let mut unstructured = Unstructured::new(&buf);
5892        Self::arbitrary(&mut unstructured).unwrap_or_default()
5893    }
5894}
5895impl Default for ATTITUDE_DATA {
5896    fn default() -> Self {
5897        Self::DEFAULT.clone()
5898    }
5899}
5900impl MessageData for ATTITUDE_DATA {
5901    type Message = MavMessage;
5902    const ID: u32 = 30u32;
5903    const NAME: &'static str = "ATTITUDE";
5904    const EXTRA_CRC: u8 = 39u8;
5905    const ENCODED_LEN: usize = 28usize;
5906    fn deser(
5907        _version: MavlinkVersion,
5908        __input: &[u8],
5909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5910        let avail_len = __input.len();
5911        let mut payload_buf = [0; Self::ENCODED_LEN];
5912        let mut buf = if avail_len < Self::ENCODED_LEN {
5913            payload_buf[0..avail_len].copy_from_slice(__input);
5914            Bytes::new(&payload_buf)
5915        } else {
5916            Bytes::new(__input)
5917        };
5918        let mut __struct = Self::default();
5919        __struct.time_boot_ms = buf.get_u32_le();
5920        __struct.roll = buf.get_f32_le();
5921        __struct.pitch = buf.get_f32_le();
5922        __struct.yaw = buf.get_f32_le();
5923        __struct.rollspeed = buf.get_f32_le();
5924        __struct.pitchspeed = buf.get_f32_le();
5925        __struct.yawspeed = buf.get_f32_le();
5926        Ok(__struct)
5927    }
5928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5929        let mut __tmp = BytesMut::new(bytes);
5930        #[allow(clippy::absurd_extreme_comparisons)]
5931        #[allow(unused_comparisons)]
5932        if __tmp.remaining() < Self::ENCODED_LEN {
5933            panic!(
5934                "buffer is too small (need {} bytes, but got {})",
5935                Self::ENCODED_LEN,
5936                __tmp.remaining(),
5937            )
5938        }
5939        __tmp.put_u32_le(self.time_boot_ms);
5940        __tmp.put_f32_le(self.roll);
5941        __tmp.put_f32_le(self.pitch);
5942        __tmp.put_f32_le(self.yaw);
5943        __tmp.put_f32_le(self.rollspeed);
5944        __tmp.put_f32_le(self.pitchspeed);
5945        __tmp.put_f32_le(self.yawspeed);
5946        if matches!(version, MavlinkVersion::V2) {
5947            let len = __tmp.len();
5948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5949        } else {
5950            __tmp.len()
5951        }
5952    }
5953}
5954#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5955#[doc = ""]
5956#[doc = "ID: 31"]
5957#[derive(Debug, Clone, PartialEq)]
5958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5960#[cfg_attr(feature = "ts", derive(TS))]
5961#[cfg_attr(feature = "ts", ts(export))]
5962pub struct ATTITUDE_QUATERNION_DATA {
5963    #[doc = "Timestamp (time since system boot)."]
5964    pub time_boot_ms: u32,
5965    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5966    pub q1: f32,
5967    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5968    pub q2: f32,
5969    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5970    pub q3: f32,
5971    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5972    pub q4: f32,
5973    #[doc = "Roll angular speed"]
5974    pub rollspeed: f32,
5975    #[doc = "Pitch angular speed"]
5976    pub pitchspeed: f32,
5977    #[doc = "Yaw angular speed"]
5978    pub yawspeed: f32,
5979    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5982    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5983    pub repr_offset_q: [f32; 4],
5984}
5985impl ATTITUDE_QUATERNION_DATA {
5986    pub const ENCODED_LEN: usize = 48usize;
5987    pub const DEFAULT: Self = Self {
5988        time_boot_ms: 0_u32,
5989        q1: 0.0_f32,
5990        q2: 0.0_f32,
5991        q3: 0.0_f32,
5992        q4: 0.0_f32,
5993        rollspeed: 0.0_f32,
5994        pitchspeed: 0.0_f32,
5995        yawspeed: 0.0_f32,
5996        repr_offset_q: [0.0_f32; 4usize],
5997    };
5998    #[cfg(feature = "arbitrary")]
5999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6000        use arbitrary::{Arbitrary, Unstructured};
6001        let mut buf = [0u8; 1024];
6002        rng.fill_bytes(&mut buf);
6003        let mut unstructured = Unstructured::new(&buf);
6004        Self::arbitrary(&mut unstructured).unwrap_or_default()
6005    }
6006}
6007impl Default for ATTITUDE_QUATERNION_DATA {
6008    fn default() -> Self {
6009        Self::DEFAULT.clone()
6010    }
6011}
6012impl MessageData for ATTITUDE_QUATERNION_DATA {
6013    type Message = MavMessage;
6014    const ID: u32 = 31u32;
6015    const NAME: &'static str = "ATTITUDE_QUATERNION";
6016    const EXTRA_CRC: u8 = 246u8;
6017    const ENCODED_LEN: usize = 48usize;
6018    fn deser(
6019        _version: MavlinkVersion,
6020        __input: &[u8],
6021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6022        let avail_len = __input.len();
6023        let mut payload_buf = [0; Self::ENCODED_LEN];
6024        let mut buf = if avail_len < Self::ENCODED_LEN {
6025            payload_buf[0..avail_len].copy_from_slice(__input);
6026            Bytes::new(&payload_buf)
6027        } else {
6028            Bytes::new(__input)
6029        };
6030        let mut __struct = Self::default();
6031        __struct.time_boot_ms = buf.get_u32_le();
6032        __struct.q1 = buf.get_f32_le();
6033        __struct.q2 = buf.get_f32_le();
6034        __struct.q3 = buf.get_f32_le();
6035        __struct.q4 = buf.get_f32_le();
6036        __struct.rollspeed = buf.get_f32_le();
6037        __struct.pitchspeed = buf.get_f32_le();
6038        __struct.yawspeed = buf.get_f32_le();
6039        for v in &mut __struct.repr_offset_q {
6040            let val = buf.get_f32_le();
6041            *v = val;
6042        }
6043        Ok(__struct)
6044    }
6045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6046        let mut __tmp = BytesMut::new(bytes);
6047        #[allow(clippy::absurd_extreme_comparisons)]
6048        #[allow(unused_comparisons)]
6049        if __tmp.remaining() < Self::ENCODED_LEN {
6050            panic!(
6051                "buffer is too small (need {} bytes, but got {})",
6052                Self::ENCODED_LEN,
6053                __tmp.remaining(),
6054            )
6055        }
6056        __tmp.put_u32_le(self.time_boot_ms);
6057        __tmp.put_f32_le(self.q1);
6058        __tmp.put_f32_le(self.q2);
6059        __tmp.put_f32_le(self.q3);
6060        __tmp.put_f32_le(self.q4);
6061        __tmp.put_f32_le(self.rollspeed);
6062        __tmp.put_f32_le(self.pitchspeed);
6063        __tmp.put_f32_le(self.yawspeed);
6064        if matches!(version, MavlinkVersion::V2) {
6065            for val in &self.repr_offset_q {
6066                __tmp.put_f32_le(*val);
6067            }
6068            let len = __tmp.len();
6069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6070        } else {
6071            __tmp.len()
6072        }
6073    }
6074}
6075#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6076#[doc = ""]
6077#[doc = "ID: 61"]
6078#[derive(Debug, Clone, PartialEq)]
6079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6081#[cfg_attr(feature = "ts", derive(TS))]
6082#[cfg_attr(feature = "ts", ts(export))]
6083pub struct ATTITUDE_QUATERNION_COV_DATA {
6084    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6085    pub time_usec: u64,
6086    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6089    pub q: [f32; 4],
6090    #[doc = "Roll angular speed"]
6091    pub rollspeed: f32,
6092    #[doc = "Pitch angular speed"]
6093    pub pitchspeed: f32,
6094    #[doc = "Yaw angular speed"]
6095    pub yawspeed: f32,
6096    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6097    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6098    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6099    pub covariance: [f32; 9],
6100}
6101impl ATTITUDE_QUATERNION_COV_DATA {
6102    pub const ENCODED_LEN: usize = 72usize;
6103    pub const DEFAULT: Self = Self {
6104        time_usec: 0_u64,
6105        q: [0.0_f32; 4usize],
6106        rollspeed: 0.0_f32,
6107        pitchspeed: 0.0_f32,
6108        yawspeed: 0.0_f32,
6109        covariance: [0.0_f32; 9usize],
6110    };
6111    #[cfg(feature = "arbitrary")]
6112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6113        use arbitrary::{Arbitrary, Unstructured};
6114        let mut buf = [0u8; 1024];
6115        rng.fill_bytes(&mut buf);
6116        let mut unstructured = Unstructured::new(&buf);
6117        Self::arbitrary(&mut unstructured).unwrap_or_default()
6118    }
6119}
6120impl Default for ATTITUDE_QUATERNION_COV_DATA {
6121    fn default() -> Self {
6122        Self::DEFAULT.clone()
6123    }
6124}
6125impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6126    type Message = MavMessage;
6127    const ID: u32 = 61u32;
6128    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6129    const EXTRA_CRC: u8 = 167u8;
6130    const ENCODED_LEN: usize = 72usize;
6131    fn deser(
6132        _version: MavlinkVersion,
6133        __input: &[u8],
6134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6135        let avail_len = __input.len();
6136        let mut payload_buf = [0; Self::ENCODED_LEN];
6137        let mut buf = if avail_len < Self::ENCODED_LEN {
6138            payload_buf[0..avail_len].copy_from_slice(__input);
6139            Bytes::new(&payload_buf)
6140        } else {
6141            Bytes::new(__input)
6142        };
6143        let mut __struct = Self::default();
6144        __struct.time_usec = buf.get_u64_le();
6145        for v in &mut __struct.q {
6146            let val = buf.get_f32_le();
6147            *v = val;
6148        }
6149        __struct.rollspeed = buf.get_f32_le();
6150        __struct.pitchspeed = buf.get_f32_le();
6151        __struct.yawspeed = buf.get_f32_le();
6152        for v in &mut __struct.covariance {
6153            let val = buf.get_f32_le();
6154            *v = val;
6155        }
6156        Ok(__struct)
6157    }
6158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6159        let mut __tmp = BytesMut::new(bytes);
6160        #[allow(clippy::absurd_extreme_comparisons)]
6161        #[allow(unused_comparisons)]
6162        if __tmp.remaining() < Self::ENCODED_LEN {
6163            panic!(
6164                "buffer is too small (need {} bytes, but got {})",
6165                Self::ENCODED_LEN,
6166                __tmp.remaining(),
6167            )
6168        }
6169        __tmp.put_u64_le(self.time_usec);
6170        for val in &self.q {
6171            __tmp.put_f32_le(*val);
6172        }
6173        __tmp.put_f32_le(self.rollspeed);
6174        __tmp.put_f32_le(self.pitchspeed);
6175        __tmp.put_f32_le(self.yawspeed);
6176        for val in &self.covariance {
6177            __tmp.put_f32_le(*val);
6178        }
6179        if matches!(version, MavlinkVersion::V2) {
6180            let len = __tmp.len();
6181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6182        } else {
6183            __tmp.len()
6184        }
6185    }
6186}
6187#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6188#[doc = ""]
6189#[doc = "ID: 83"]
6190#[derive(Debug, Clone, PartialEq)]
6191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6193#[cfg_attr(feature = "ts", derive(TS))]
6194#[cfg_attr(feature = "ts", ts(export))]
6195pub struct ATTITUDE_TARGET_DATA {
6196    #[doc = "Timestamp (time since system boot)."]
6197    pub time_boot_ms: u32,
6198    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6200    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6201    pub q: [f32; 4],
6202    #[doc = "Body roll rate"]
6203    pub body_roll_rate: f32,
6204    #[doc = "Body pitch rate"]
6205    pub body_pitch_rate: f32,
6206    #[doc = "Body yaw rate"]
6207    pub body_yaw_rate: f32,
6208    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6209    pub thrust: f32,
6210    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6211    pub type_mask: AttitudeTargetTypemask,
6212}
6213impl ATTITUDE_TARGET_DATA {
6214    pub const ENCODED_LEN: usize = 37usize;
6215    pub const DEFAULT: Self = Self {
6216        time_boot_ms: 0_u32,
6217        q: [0.0_f32; 4usize],
6218        body_roll_rate: 0.0_f32,
6219        body_pitch_rate: 0.0_f32,
6220        body_yaw_rate: 0.0_f32,
6221        thrust: 0.0_f32,
6222        type_mask: AttitudeTargetTypemask::DEFAULT,
6223    };
6224    #[cfg(feature = "arbitrary")]
6225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6226        use arbitrary::{Arbitrary, Unstructured};
6227        let mut buf = [0u8; 1024];
6228        rng.fill_bytes(&mut buf);
6229        let mut unstructured = Unstructured::new(&buf);
6230        Self::arbitrary(&mut unstructured).unwrap_or_default()
6231    }
6232}
6233impl Default for ATTITUDE_TARGET_DATA {
6234    fn default() -> Self {
6235        Self::DEFAULT.clone()
6236    }
6237}
6238impl MessageData for ATTITUDE_TARGET_DATA {
6239    type Message = MavMessage;
6240    const ID: u32 = 83u32;
6241    const NAME: &'static str = "ATTITUDE_TARGET";
6242    const EXTRA_CRC: u8 = 22u8;
6243    const ENCODED_LEN: usize = 37usize;
6244    fn deser(
6245        _version: MavlinkVersion,
6246        __input: &[u8],
6247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6248        let avail_len = __input.len();
6249        let mut payload_buf = [0; Self::ENCODED_LEN];
6250        let mut buf = if avail_len < Self::ENCODED_LEN {
6251            payload_buf[0..avail_len].copy_from_slice(__input);
6252            Bytes::new(&payload_buf)
6253        } else {
6254            Bytes::new(__input)
6255        };
6256        let mut __struct = Self::default();
6257        __struct.time_boot_ms = buf.get_u32_le();
6258        for v in &mut __struct.q {
6259            let val = buf.get_f32_le();
6260            *v = val;
6261        }
6262        __struct.body_roll_rate = buf.get_f32_le();
6263        __struct.body_pitch_rate = buf.get_f32_le();
6264        __struct.body_yaw_rate = buf.get_f32_le();
6265        __struct.thrust = buf.get_f32_le();
6266        let tmp = buf.get_u8();
6267        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
6268            ::mavlink_core::error::ParserError::InvalidFlag {
6269                flag_type: "AttitudeTargetTypemask",
6270                value: tmp as u64,
6271            },
6272        )?;
6273        Ok(__struct)
6274    }
6275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6276        let mut __tmp = BytesMut::new(bytes);
6277        #[allow(clippy::absurd_extreme_comparisons)]
6278        #[allow(unused_comparisons)]
6279        if __tmp.remaining() < Self::ENCODED_LEN {
6280            panic!(
6281                "buffer is too small (need {} bytes, but got {})",
6282                Self::ENCODED_LEN,
6283                __tmp.remaining(),
6284            )
6285        }
6286        __tmp.put_u32_le(self.time_boot_ms);
6287        for val in &self.q {
6288            __tmp.put_f32_le(*val);
6289        }
6290        __tmp.put_f32_le(self.body_roll_rate);
6291        __tmp.put_f32_le(self.body_pitch_rate);
6292        __tmp.put_f32_le(self.body_yaw_rate);
6293        __tmp.put_f32_le(self.thrust);
6294        __tmp.put_u8(self.type_mask.bits());
6295        if matches!(version, MavlinkVersion::V2) {
6296            let len = __tmp.len();
6297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6298        } else {
6299            __tmp.len()
6300        }
6301    }
6302}
6303#[doc = "Motion capture attitude and position."]
6304#[doc = ""]
6305#[doc = "ID: 138"]
6306#[derive(Debug, Clone, PartialEq)]
6307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6309#[cfg_attr(feature = "ts", derive(TS))]
6310#[cfg_attr(feature = "ts", ts(export))]
6311pub struct ATT_POS_MOCAP_DATA {
6312    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6313    pub time_usec: u64,
6314    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6317    pub q: [f32; 4],
6318    #[doc = "X position (NED)"]
6319    pub x: f32,
6320    #[doc = "Y position (NED)"]
6321    pub y: f32,
6322    #[doc = "Z position (NED)"]
6323    pub z: f32,
6324    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6327    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6328    pub covariance: [f32; 21],
6329}
6330impl ATT_POS_MOCAP_DATA {
6331    pub const ENCODED_LEN: usize = 120usize;
6332    pub const DEFAULT: Self = Self {
6333        time_usec: 0_u64,
6334        q: [0.0_f32; 4usize],
6335        x: 0.0_f32,
6336        y: 0.0_f32,
6337        z: 0.0_f32,
6338        covariance: [0.0_f32; 21usize],
6339    };
6340    #[cfg(feature = "arbitrary")]
6341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6342        use arbitrary::{Arbitrary, Unstructured};
6343        let mut buf = [0u8; 1024];
6344        rng.fill_bytes(&mut buf);
6345        let mut unstructured = Unstructured::new(&buf);
6346        Self::arbitrary(&mut unstructured).unwrap_or_default()
6347    }
6348}
6349impl Default for ATT_POS_MOCAP_DATA {
6350    fn default() -> Self {
6351        Self::DEFAULT.clone()
6352    }
6353}
6354impl MessageData for ATT_POS_MOCAP_DATA {
6355    type Message = MavMessage;
6356    const ID: u32 = 138u32;
6357    const NAME: &'static str = "ATT_POS_MOCAP";
6358    const EXTRA_CRC: u8 = 109u8;
6359    const ENCODED_LEN: usize = 120usize;
6360    fn deser(
6361        _version: MavlinkVersion,
6362        __input: &[u8],
6363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6364        let avail_len = __input.len();
6365        let mut payload_buf = [0; Self::ENCODED_LEN];
6366        let mut buf = if avail_len < Self::ENCODED_LEN {
6367            payload_buf[0..avail_len].copy_from_slice(__input);
6368            Bytes::new(&payload_buf)
6369        } else {
6370            Bytes::new(__input)
6371        };
6372        let mut __struct = Self::default();
6373        __struct.time_usec = buf.get_u64_le();
6374        for v in &mut __struct.q {
6375            let val = buf.get_f32_le();
6376            *v = val;
6377        }
6378        __struct.x = buf.get_f32_le();
6379        __struct.y = buf.get_f32_le();
6380        __struct.z = buf.get_f32_le();
6381        for v in &mut __struct.covariance {
6382            let val = buf.get_f32_le();
6383            *v = val;
6384        }
6385        Ok(__struct)
6386    }
6387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6388        let mut __tmp = BytesMut::new(bytes);
6389        #[allow(clippy::absurd_extreme_comparisons)]
6390        #[allow(unused_comparisons)]
6391        if __tmp.remaining() < Self::ENCODED_LEN {
6392            panic!(
6393                "buffer is too small (need {} bytes, but got {})",
6394                Self::ENCODED_LEN,
6395                __tmp.remaining(),
6396            )
6397        }
6398        __tmp.put_u64_le(self.time_usec);
6399        for val in &self.q {
6400            __tmp.put_f32_le(*val);
6401        }
6402        __tmp.put_f32_le(self.x);
6403        __tmp.put_f32_le(self.y);
6404        __tmp.put_f32_le(self.z);
6405        if matches!(version, MavlinkVersion::V2) {
6406            for val in &self.covariance {
6407                __tmp.put_f32_le(*val);
6408            }
6409            let len = __tmp.len();
6410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6411        } else {
6412            __tmp.len()
6413        }
6414    }
6415}
6416#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6417#[doc = ""]
6418#[doc = "ID: 7"]
6419#[derive(Debug, Clone, PartialEq)]
6420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6422#[cfg_attr(feature = "ts", derive(TS))]
6423#[cfg_attr(feature = "ts", ts(export))]
6424pub struct AUTH_KEY_DATA {
6425    #[doc = "key"]
6426    #[cfg_attr(feature = "ts", ts(type = "string"))]
6427    pub key: CharArray<32>,
6428}
6429impl AUTH_KEY_DATA {
6430    pub const ENCODED_LEN: usize = 32usize;
6431    pub const DEFAULT: Self = Self {
6432        key: CharArray::new([0_u8; 32usize]),
6433    };
6434    #[cfg(feature = "arbitrary")]
6435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6436        use arbitrary::{Arbitrary, Unstructured};
6437        let mut buf = [0u8; 1024];
6438        rng.fill_bytes(&mut buf);
6439        let mut unstructured = Unstructured::new(&buf);
6440        Self::arbitrary(&mut unstructured).unwrap_or_default()
6441    }
6442}
6443impl Default for AUTH_KEY_DATA {
6444    fn default() -> Self {
6445        Self::DEFAULT.clone()
6446    }
6447}
6448impl MessageData for AUTH_KEY_DATA {
6449    type Message = MavMessage;
6450    const ID: u32 = 7u32;
6451    const NAME: &'static str = "AUTH_KEY";
6452    const EXTRA_CRC: u8 = 119u8;
6453    const ENCODED_LEN: usize = 32usize;
6454    fn deser(
6455        _version: MavlinkVersion,
6456        __input: &[u8],
6457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6458        let avail_len = __input.len();
6459        let mut payload_buf = [0; Self::ENCODED_LEN];
6460        let mut buf = if avail_len < Self::ENCODED_LEN {
6461            payload_buf[0..avail_len].copy_from_slice(__input);
6462            Bytes::new(&payload_buf)
6463        } else {
6464            Bytes::new(__input)
6465        };
6466        let mut __struct = Self::default();
6467        let mut tmp = [0_u8; 32usize];
6468        for v in &mut tmp {
6469            *v = buf.get_u8();
6470        }
6471        __struct.key = CharArray::new(tmp);
6472        Ok(__struct)
6473    }
6474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6475        let mut __tmp = BytesMut::new(bytes);
6476        #[allow(clippy::absurd_extreme_comparisons)]
6477        #[allow(unused_comparisons)]
6478        if __tmp.remaining() < Self::ENCODED_LEN {
6479            panic!(
6480                "buffer is too small (need {} bytes, but got {})",
6481                Self::ENCODED_LEN,
6482                __tmp.remaining(),
6483            )
6484        }
6485        for val in &self.key {
6486            __tmp.put_u8(*val);
6487        }
6488        if matches!(version, MavlinkVersion::V2) {
6489            let len = __tmp.len();
6490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6491        } else {
6492            __tmp.len()
6493        }
6494    }
6495}
6496#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6497#[doc = ""]
6498#[doc = "ID: 286"]
6499#[derive(Debug, Clone, PartialEq)]
6500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6502#[cfg_attr(feature = "ts", derive(TS))]
6503#[cfg_attr(feature = "ts", ts(export))]
6504pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6505    #[doc = "Timestamp (time since system boot)."]
6506    pub time_boot_us: u64,
6507    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6510    pub q: [f32; 4],
6511    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6512    pub q_estimated_delay_us: u32,
6513    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6514    pub vx: f32,
6515    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6516    pub vy: f32,
6517    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6518    pub vz: f32,
6519    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6520    pub v_estimated_delay_us: u32,
6521    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6522    pub feed_forward_angular_velocity_z: f32,
6523    #[doc = "Bitmap indicating which estimator outputs are valid."]
6524    pub estimator_status: EstimatorStatusFlags,
6525    #[doc = "System ID"]
6526    pub target_system: u8,
6527    #[doc = "Component ID"]
6528    pub target_component: u8,
6529    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6530    pub landed_state: MavLandedState,
6531    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6533    pub angular_velocity_z: f32,
6534}
6535impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6536    pub const ENCODED_LEN: usize = 57usize;
6537    pub const DEFAULT: Self = Self {
6538        time_boot_us: 0_u64,
6539        q: [0.0_f32; 4usize],
6540        q_estimated_delay_us: 0_u32,
6541        vx: 0.0_f32,
6542        vy: 0.0_f32,
6543        vz: 0.0_f32,
6544        v_estimated_delay_us: 0_u32,
6545        feed_forward_angular_velocity_z: 0.0_f32,
6546        estimator_status: EstimatorStatusFlags::DEFAULT,
6547        target_system: 0_u8,
6548        target_component: 0_u8,
6549        landed_state: MavLandedState::DEFAULT,
6550        angular_velocity_z: 0.0_f32,
6551    };
6552    #[cfg(feature = "arbitrary")]
6553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6554        use arbitrary::{Arbitrary, Unstructured};
6555        let mut buf = [0u8; 1024];
6556        rng.fill_bytes(&mut buf);
6557        let mut unstructured = Unstructured::new(&buf);
6558        Self::arbitrary(&mut unstructured).unwrap_or_default()
6559    }
6560}
6561impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6562    fn default() -> Self {
6563        Self::DEFAULT.clone()
6564    }
6565}
6566impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6567    type Message = MavMessage;
6568    const ID: u32 = 286u32;
6569    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6570    const EXTRA_CRC: u8 = 210u8;
6571    const ENCODED_LEN: usize = 57usize;
6572    fn deser(
6573        _version: MavlinkVersion,
6574        __input: &[u8],
6575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6576        let avail_len = __input.len();
6577        let mut payload_buf = [0; Self::ENCODED_LEN];
6578        let mut buf = if avail_len < Self::ENCODED_LEN {
6579            payload_buf[0..avail_len].copy_from_slice(__input);
6580            Bytes::new(&payload_buf)
6581        } else {
6582            Bytes::new(__input)
6583        };
6584        let mut __struct = Self::default();
6585        __struct.time_boot_us = buf.get_u64_le();
6586        for v in &mut __struct.q {
6587            let val = buf.get_f32_le();
6588            *v = val;
6589        }
6590        __struct.q_estimated_delay_us = buf.get_u32_le();
6591        __struct.vx = buf.get_f32_le();
6592        __struct.vy = buf.get_f32_le();
6593        __struct.vz = buf.get_f32_le();
6594        __struct.v_estimated_delay_us = buf.get_u32_le();
6595        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6596        let tmp = buf.get_u16_le();
6597        __struct.estimator_status = EstimatorStatusFlags::from_bits(tmp).ok_or(
6598            ::mavlink_core::error::ParserError::InvalidFlag {
6599                flag_type: "EstimatorStatusFlags",
6600                value: tmp as u64,
6601            },
6602        )?;
6603        __struct.target_system = buf.get_u8();
6604        __struct.target_component = buf.get_u8();
6605        let tmp = buf.get_u8();
6606        __struct.landed_state =
6607            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6608                enum_type: "MavLandedState",
6609                value: tmp as u64,
6610            })?;
6611        __struct.angular_velocity_z = buf.get_f32_le();
6612        Ok(__struct)
6613    }
6614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6615        let mut __tmp = BytesMut::new(bytes);
6616        #[allow(clippy::absurd_extreme_comparisons)]
6617        #[allow(unused_comparisons)]
6618        if __tmp.remaining() < Self::ENCODED_LEN {
6619            panic!(
6620                "buffer is too small (need {} bytes, but got {})",
6621                Self::ENCODED_LEN,
6622                __tmp.remaining(),
6623            )
6624        }
6625        __tmp.put_u64_le(self.time_boot_us);
6626        for val in &self.q {
6627            __tmp.put_f32_le(*val);
6628        }
6629        __tmp.put_u32_le(self.q_estimated_delay_us);
6630        __tmp.put_f32_le(self.vx);
6631        __tmp.put_f32_le(self.vy);
6632        __tmp.put_f32_le(self.vz);
6633        __tmp.put_u32_le(self.v_estimated_delay_us);
6634        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6635        __tmp.put_u16_le(self.estimator_status.bits());
6636        __tmp.put_u8(self.target_system);
6637        __tmp.put_u8(self.target_component);
6638        __tmp.put_u8(self.landed_state as u8);
6639        if matches!(version, MavlinkVersion::V2) {
6640            __tmp.put_f32_le(self.angular_velocity_z);
6641            let len = __tmp.len();
6642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6643        } else {
6644            __tmp.len()
6645        }
6646    }
6647}
6648#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6649#[doc = ""]
6650#[doc = "ID: 148"]
6651#[derive(Debug, Clone, PartialEq)]
6652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6654#[cfg_attr(feature = "ts", derive(TS))]
6655#[cfg_attr(feature = "ts", ts(export))]
6656pub struct AUTOPILOT_VERSION_DATA {
6657    #[doc = "Bitmap of capabilities"]
6658    pub capabilities: MavProtocolCapability,
6659    #[doc = "UID if provided by hardware (see uid2)"]
6660    pub uid: u64,
6661    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6662    pub flight_sw_version: u32,
6663    #[doc = "Middleware version number"]
6664    pub middleware_sw_version: u32,
6665    #[doc = "Operating system version number"]
6666    pub os_sw_version: u32,
6667    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6668    pub board_version: u32,
6669    #[doc = "ID of the board vendor"]
6670    pub vendor_id: u16,
6671    #[doc = "ID of the product"]
6672    pub product_id: u16,
6673    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6674    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6675    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6676    pub flight_custom_version: [u8; 8],
6677    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6680    pub middleware_custom_version: [u8; 8],
6681    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6683    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6684    pub os_custom_version: [u8; 8],
6685    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6689    pub uid2: [u8; 18],
6690}
6691impl AUTOPILOT_VERSION_DATA {
6692    pub const ENCODED_LEN: usize = 78usize;
6693    pub const DEFAULT: Self = Self {
6694        capabilities: MavProtocolCapability::DEFAULT,
6695        uid: 0_u64,
6696        flight_sw_version: 0_u32,
6697        middleware_sw_version: 0_u32,
6698        os_sw_version: 0_u32,
6699        board_version: 0_u32,
6700        vendor_id: 0_u16,
6701        product_id: 0_u16,
6702        flight_custom_version: [0_u8; 8usize],
6703        middleware_custom_version: [0_u8; 8usize],
6704        os_custom_version: [0_u8; 8usize],
6705        uid2: [0_u8; 18usize],
6706    };
6707    #[cfg(feature = "arbitrary")]
6708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6709        use arbitrary::{Arbitrary, Unstructured};
6710        let mut buf = [0u8; 1024];
6711        rng.fill_bytes(&mut buf);
6712        let mut unstructured = Unstructured::new(&buf);
6713        Self::arbitrary(&mut unstructured).unwrap_or_default()
6714    }
6715}
6716impl Default for AUTOPILOT_VERSION_DATA {
6717    fn default() -> Self {
6718        Self::DEFAULT.clone()
6719    }
6720}
6721impl MessageData for AUTOPILOT_VERSION_DATA {
6722    type Message = MavMessage;
6723    const ID: u32 = 148u32;
6724    const NAME: &'static str = "AUTOPILOT_VERSION";
6725    const EXTRA_CRC: u8 = 178u8;
6726    const ENCODED_LEN: usize = 78usize;
6727    fn deser(
6728        _version: MavlinkVersion,
6729        __input: &[u8],
6730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6731        let avail_len = __input.len();
6732        let mut payload_buf = [0; Self::ENCODED_LEN];
6733        let mut buf = if avail_len < Self::ENCODED_LEN {
6734            payload_buf[0..avail_len].copy_from_slice(__input);
6735            Bytes::new(&payload_buf)
6736        } else {
6737            Bytes::new(__input)
6738        };
6739        let mut __struct = Self::default();
6740        let tmp = buf.get_u64_le();
6741        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
6742            ::mavlink_core::error::ParserError::InvalidFlag {
6743                flag_type: "MavProtocolCapability",
6744                value: tmp as u64,
6745            },
6746        )?;
6747        __struct.uid = buf.get_u64_le();
6748        __struct.flight_sw_version = buf.get_u32_le();
6749        __struct.middleware_sw_version = buf.get_u32_le();
6750        __struct.os_sw_version = buf.get_u32_le();
6751        __struct.board_version = buf.get_u32_le();
6752        __struct.vendor_id = buf.get_u16_le();
6753        __struct.product_id = buf.get_u16_le();
6754        for v in &mut __struct.flight_custom_version {
6755            let val = buf.get_u8();
6756            *v = val;
6757        }
6758        for v in &mut __struct.middleware_custom_version {
6759            let val = buf.get_u8();
6760            *v = val;
6761        }
6762        for v in &mut __struct.os_custom_version {
6763            let val = buf.get_u8();
6764            *v = val;
6765        }
6766        for v in &mut __struct.uid2 {
6767            let val = buf.get_u8();
6768            *v = val;
6769        }
6770        Ok(__struct)
6771    }
6772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6773        let mut __tmp = BytesMut::new(bytes);
6774        #[allow(clippy::absurd_extreme_comparisons)]
6775        #[allow(unused_comparisons)]
6776        if __tmp.remaining() < Self::ENCODED_LEN {
6777            panic!(
6778                "buffer is too small (need {} bytes, but got {})",
6779                Self::ENCODED_LEN,
6780                __tmp.remaining(),
6781            )
6782        }
6783        __tmp.put_u64_le(self.capabilities.bits());
6784        __tmp.put_u64_le(self.uid);
6785        __tmp.put_u32_le(self.flight_sw_version);
6786        __tmp.put_u32_le(self.middleware_sw_version);
6787        __tmp.put_u32_le(self.os_sw_version);
6788        __tmp.put_u32_le(self.board_version);
6789        __tmp.put_u16_le(self.vendor_id);
6790        __tmp.put_u16_le(self.product_id);
6791        for val in &self.flight_custom_version {
6792            __tmp.put_u8(*val);
6793        }
6794        for val in &self.middleware_custom_version {
6795            __tmp.put_u8(*val);
6796        }
6797        for val in &self.os_custom_version {
6798            __tmp.put_u8(*val);
6799        }
6800        if matches!(version, MavlinkVersion::V2) {
6801            for val in &self.uid2 {
6802                __tmp.put_u8(*val);
6803            }
6804            let len = __tmp.len();
6805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6806        } else {
6807            __tmp.len()
6808        }
6809    }
6810}
6811#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6812#[doc = ""]
6813#[doc = "ID: 435"]
6814#[derive(Debug, Clone, PartialEq)]
6815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6817#[cfg_attr(feature = "ts", derive(TS))]
6818#[cfg_attr(feature = "ts", ts(export))]
6819pub struct AVAILABLE_MODES_DATA {
6820    #[doc = "A bitfield for use for autopilot-specific flags"]
6821    pub custom_mode: u32,
6822    #[doc = "Mode properties."]
6823    pub properties: MavModeProperty,
6824    #[doc = "The total number of available modes for the current vehicle type."]
6825    pub number_modes: u8,
6826    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6827    pub mode_index: u8,
6828    #[doc = "Standard mode."]
6829    pub standard_mode: MavStandardMode,
6830    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6831    #[cfg_attr(feature = "ts", ts(type = "string"))]
6832    pub mode_name: CharArray<35>,
6833}
6834impl AVAILABLE_MODES_DATA {
6835    pub const ENCODED_LEN: usize = 46usize;
6836    pub const DEFAULT: Self = Self {
6837        custom_mode: 0_u32,
6838        properties: MavModeProperty::DEFAULT,
6839        number_modes: 0_u8,
6840        mode_index: 0_u8,
6841        standard_mode: MavStandardMode::DEFAULT,
6842        mode_name: CharArray::new([0_u8; 35usize]),
6843    };
6844    #[cfg(feature = "arbitrary")]
6845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6846        use arbitrary::{Arbitrary, Unstructured};
6847        let mut buf = [0u8; 1024];
6848        rng.fill_bytes(&mut buf);
6849        let mut unstructured = Unstructured::new(&buf);
6850        Self::arbitrary(&mut unstructured).unwrap_or_default()
6851    }
6852}
6853impl Default for AVAILABLE_MODES_DATA {
6854    fn default() -> Self {
6855        Self::DEFAULT.clone()
6856    }
6857}
6858impl MessageData for AVAILABLE_MODES_DATA {
6859    type Message = MavMessage;
6860    const ID: u32 = 435u32;
6861    const NAME: &'static str = "AVAILABLE_MODES";
6862    const EXTRA_CRC: u8 = 134u8;
6863    const ENCODED_LEN: usize = 46usize;
6864    fn deser(
6865        _version: MavlinkVersion,
6866        __input: &[u8],
6867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6868        let avail_len = __input.len();
6869        let mut payload_buf = [0; Self::ENCODED_LEN];
6870        let mut buf = if avail_len < Self::ENCODED_LEN {
6871            payload_buf[0..avail_len].copy_from_slice(__input);
6872            Bytes::new(&payload_buf)
6873        } else {
6874            Bytes::new(__input)
6875        };
6876        let mut __struct = Self::default();
6877        __struct.custom_mode = buf.get_u32_le();
6878        let tmp = buf.get_u32_le();
6879        __struct.properties = MavModeProperty::from_bits(tmp).ok_or(
6880            ::mavlink_core::error::ParserError::InvalidFlag {
6881                flag_type: "MavModeProperty",
6882                value: tmp as u64,
6883            },
6884        )?;
6885        __struct.number_modes = buf.get_u8();
6886        __struct.mode_index = buf.get_u8();
6887        let tmp = buf.get_u8();
6888        __struct.standard_mode =
6889            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6890                enum_type: "MavStandardMode",
6891                value: tmp as u64,
6892            })?;
6893        let mut tmp = [0_u8; 35usize];
6894        for v in &mut tmp {
6895            *v = buf.get_u8();
6896        }
6897        __struct.mode_name = CharArray::new(tmp);
6898        Ok(__struct)
6899    }
6900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6901        let mut __tmp = BytesMut::new(bytes);
6902        #[allow(clippy::absurd_extreme_comparisons)]
6903        #[allow(unused_comparisons)]
6904        if __tmp.remaining() < Self::ENCODED_LEN {
6905            panic!(
6906                "buffer is too small (need {} bytes, but got {})",
6907                Self::ENCODED_LEN,
6908                __tmp.remaining(),
6909            )
6910        }
6911        __tmp.put_u32_le(self.custom_mode);
6912        __tmp.put_u32_le(self.properties.bits());
6913        __tmp.put_u8(self.number_modes);
6914        __tmp.put_u8(self.mode_index);
6915        __tmp.put_u8(self.standard_mode as u8);
6916        for val in &self.mode_name {
6917            __tmp.put_u8(*val);
6918        }
6919        if matches!(version, MavlinkVersion::V2) {
6920            let len = __tmp.len();
6921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6922        } else {
6923            __tmp.len()
6924        }
6925    }
6926}
6927#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6928#[doc = ""]
6929#[doc = "ID: 437"]
6930#[derive(Debug, Clone, PartialEq)]
6931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6933#[cfg_attr(feature = "ts", derive(TS))]
6934#[cfg_attr(feature = "ts", ts(export))]
6935pub struct AVAILABLE_MODES_MONITOR_DATA {
6936    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6937    pub seq: u8,
6938}
6939impl AVAILABLE_MODES_MONITOR_DATA {
6940    pub const ENCODED_LEN: usize = 1usize;
6941    pub const DEFAULT: Self = Self { seq: 0_u8 };
6942    #[cfg(feature = "arbitrary")]
6943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6944        use arbitrary::{Arbitrary, Unstructured};
6945        let mut buf = [0u8; 1024];
6946        rng.fill_bytes(&mut buf);
6947        let mut unstructured = Unstructured::new(&buf);
6948        Self::arbitrary(&mut unstructured).unwrap_or_default()
6949    }
6950}
6951impl Default for AVAILABLE_MODES_MONITOR_DATA {
6952    fn default() -> Self {
6953        Self::DEFAULT.clone()
6954    }
6955}
6956impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6957    type Message = MavMessage;
6958    const ID: u32 = 437u32;
6959    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6960    const EXTRA_CRC: u8 = 30u8;
6961    const ENCODED_LEN: usize = 1usize;
6962    fn deser(
6963        _version: MavlinkVersion,
6964        __input: &[u8],
6965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6966        let avail_len = __input.len();
6967        let mut payload_buf = [0; Self::ENCODED_LEN];
6968        let mut buf = if avail_len < Self::ENCODED_LEN {
6969            payload_buf[0..avail_len].copy_from_slice(__input);
6970            Bytes::new(&payload_buf)
6971        } else {
6972            Bytes::new(__input)
6973        };
6974        let mut __struct = Self::default();
6975        __struct.seq = buf.get_u8();
6976        Ok(__struct)
6977    }
6978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6979        let mut __tmp = BytesMut::new(bytes);
6980        #[allow(clippy::absurd_extreme_comparisons)]
6981        #[allow(unused_comparisons)]
6982        if __tmp.remaining() < Self::ENCODED_LEN {
6983            panic!(
6984                "buffer is too small (need {} bytes, but got {})",
6985                Self::ENCODED_LEN,
6986                __tmp.remaining(),
6987            )
6988        }
6989        __tmp.put_u8(self.seq);
6990        if matches!(version, MavlinkVersion::V2) {
6991            let len = __tmp.len();
6992            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6993        } else {
6994            __tmp.len()
6995        }
6996    }
6997}
6998#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6999#[doc = ""]
7000#[doc = "ID: 372"]
7001#[derive(Debug, Clone, PartialEq)]
7002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7004#[cfg_attr(feature = "ts", derive(TS))]
7005#[cfg_attr(feature = "ts", ts(export))]
7006pub struct BATTERY_INFO_DATA {
7007    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7008    pub discharge_minimum_voltage: f32,
7009    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7010    pub charging_minimum_voltage: f32,
7011    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7012    pub resting_minimum_voltage: f32,
7013    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7014    pub charging_maximum_voltage: f32,
7015    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7016    pub charging_maximum_current: f32,
7017    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7018    pub nominal_voltage: f32,
7019    #[doc = "Maximum pack discharge current. 0: field not provided."]
7020    pub discharge_maximum_current: f32,
7021    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7022    pub discharge_maximum_burst_current: f32,
7023    #[doc = "Fully charged design capacity. 0: field not provided."]
7024    pub design_capacity: f32,
7025    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7026    pub full_charge_capacity: f32,
7027    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7028    pub cycle_count: u16,
7029    #[doc = "Battery weight. 0: field not provided."]
7030    pub weight: u16,
7031    #[doc = "Battery ID"]
7032    pub id: u8,
7033    #[doc = "Function of the battery."]
7034    pub battery_function: MavBatteryFunction,
7035    #[doc = "Type (chemistry) of the battery."]
7036    pub mavtype: MavBatteryType,
7037    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7038    pub state_of_health: u8,
7039    #[doc = "Number of battery cells in series. 0: field not provided."]
7040    pub cells_in_series: u8,
7041    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7042    #[cfg_attr(feature = "ts", ts(type = "string"))]
7043    pub manufacture_date: CharArray<9>,
7044    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7045    #[cfg_attr(feature = "ts", ts(type = "string"))]
7046    pub serial_number: CharArray<32>,
7047    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7048    #[cfg_attr(feature = "ts", ts(type = "string"))]
7049    pub name: CharArray<50>,
7050}
7051impl BATTERY_INFO_DATA {
7052    pub const ENCODED_LEN: usize = 140usize;
7053    pub const DEFAULT: Self = Self {
7054        discharge_minimum_voltage: 0.0_f32,
7055        charging_minimum_voltage: 0.0_f32,
7056        resting_minimum_voltage: 0.0_f32,
7057        charging_maximum_voltage: 0.0_f32,
7058        charging_maximum_current: 0.0_f32,
7059        nominal_voltage: 0.0_f32,
7060        discharge_maximum_current: 0.0_f32,
7061        discharge_maximum_burst_current: 0.0_f32,
7062        design_capacity: 0.0_f32,
7063        full_charge_capacity: 0.0_f32,
7064        cycle_count: 0_u16,
7065        weight: 0_u16,
7066        id: 0_u8,
7067        battery_function: MavBatteryFunction::DEFAULT,
7068        mavtype: MavBatteryType::DEFAULT,
7069        state_of_health: 0_u8,
7070        cells_in_series: 0_u8,
7071        manufacture_date: CharArray::new([0_u8; 9usize]),
7072        serial_number: CharArray::new([0_u8; 32usize]),
7073        name: CharArray::new([0_u8; 50usize]),
7074    };
7075    #[cfg(feature = "arbitrary")]
7076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7077        use arbitrary::{Arbitrary, Unstructured};
7078        let mut buf = [0u8; 1024];
7079        rng.fill_bytes(&mut buf);
7080        let mut unstructured = Unstructured::new(&buf);
7081        Self::arbitrary(&mut unstructured).unwrap_or_default()
7082    }
7083}
7084impl Default for BATTERY_INFO_DATA {
7085    fn default() -> Self {
7086        Self::DEFAULT.clone()
7087    }
7088}
7089impl MessageData for BATTERY_INFO_DATA {
7090    type Message = MavMessage;
7091    const ID: u32 = 372u32;
7092    const NAME: &'static str = "BATTERY_INFO";
7093    const EXTRA_CRC: u8 = 26u8;
7094    const ENCODED_LEN: usize = 140usize;
7095    fn deser(
7096        _version: MavlinkVersion,
7097        __input: &[u8],
7098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7099        let avail_len = __input.len();
7100        let mut payload_buf = [0; Self::ENCODED_LEN];
7101        let mut buf = if avail_len < Self::ENCODED_LEN {
7102            payload_buf[0..avail_len].copy_from_slice(__input);
7103            Bytes::new(&payload_buf)
7104        } else {
7105            Bytes::new(__input)
7106        };
7107        let mut __struct = Self::default();
7108        __struct.discharge_minimum_voltage = buf.get_f32_le();
7109        __struct.charging_minimum_voltage = buf.get_f32_le();
7110        __struct.resting_minimum_voltage = buf.get_f32_le();
7111        __struct.charging_maximum_voltage = buf.get_f32_le();
7112        __struct.charging_maximum_current = buf.get_f32_le();
7113        __struct.nominal_voltage = buf.get_f32_le();
7114        __struct.discharge_maximum_current = buf.get_f32_le();
7115        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7116        __struct.design_capacity = buf.get_f32_le();
7117        __struct.full_charge_capacity = buf.get_f32_le();
7118        __struct.cycle_count = buf.get_u16_le();
7119        __struct.weight = buf.get_u16_le();
7120        __struct.id = buf.get_u8();
7121        let tmp = buf.get_u8();
7122        __struct.battery_function =
7123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7124                enum_type: "MavBatteryFunction",
7125                value: tmp as u64,
7126            })?;
7127        let tmp = buf.get_u8();
7128        __struct.mavtype =
7129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7130                enum_type: "MavBatteryType",
7131                value: tmp as u64,
7132            })?;
7133        __struct.state_of_health = buf.get_u8();
7134        __struct.cells_in_series = buf.get_u8();
7135        let mut tmp = [0_u8; 9usize];
7136        for v in &mut tmp {
7137            *v = buf.get_u8();
7138        }
7139        __struct.manufacture_date = CharArray::new(tmp);
7140        let mut tmp = [0_u8; 32usize];
7141        for v in &mut tmp {
7142            *v = buf.get_u8();
7143        }
7144        __struct.serial_number = CharArray::new(tmp);
7145        let mut tmp = [0_u8; 50usize];
7146        for v in &mut tmp {
7147            *v = buf.get_u8();
7148        }
7149        __struct.name = CharArray::new(tmp);
7150        Ok(__struct)
7151    }
7152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7153        let mut __tmp = BytesMut::new(bytes);
7154        #[allow(clippy::absurd_extreme_comparisons)]
7155        #[allow(unused_comparisons)]
7156        if __tmp.remaining() < Self::ENCODED_LEN {
7157            panic!(
7158                "buffer is too small (need {} bytes, but got {})",
7159                Self::ENCODED_LEN,
7160                __tmp.remaining(),
7161            )
7162        }
7163        __tmp.put_f32_le(self.discharge_minimum_voltage);
7164        __tmp.put_f32_le(self.charging_minimum_voltage);
7165        __tmp.put_f32_le(self.resting_minimum_voltage);
7166        __tmp.put_f32_le(self.charging_maximum_voltage);
7167        __tmp.put_f32_le(self.charging_maximum_current);
7168        __tmp.put_f32_le(self.nominal_voltage);
7169        __tmp.put_f32_le(self.discharge_maximum_current);
7170        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7171        __tmp.put_f32_le(self.design_capacity);
7172        __tmp.put_f32_le(self.full_charge_capacity);
7173        __tmp.put_u16_le(self.cycle_count);
7174        __tmp.put_u16_le(self.weight);
7175        __tmp.put_u8(self.id);
7176        __tmp.put_u8(self.battery_function as u8);
7177        __tmp.put_u8(self.mavtype as u8);
7178        __tmp.put_u8(self.state_of_health);
7179        __tmp.put_u8(self.cells_in_series);
7180        for val in &self.manufacture_date {
7181            __tmp.put_u8(*val);
7182        }
7183        for val in &self.serial_number {
7184            __tmp.put_u8(*val);
7185        }
7186        for val in &self.name {
7187            __tmp.put_u8(*val);
7188        }
7189        if matches!(version, MavlinkVersion::V2) {
7190            let len = __tmp.len();
7191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7192        } else {
7193            __tmp.len()
7194        }
7195    }
7196}
7197#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7198#[doc = ""]
7199#[doc = "ID: 147"]
7200#[derive(Debug, Clone, PartialEq)]
7201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7203#[cfg_attr(feature = "ts", derive(TS))]
7204#[cfg_attr(feature = "ts", ts(export))]
7205pub struct BATTERY_STATUS_DATA {
7206    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7207    pub current_consumed: i32,
7208    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7209    pub energy_consumed: i32,
7210    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7211    pub temperature: i16,
7212    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7215    pub voltages: [u16; 10],
7216    #[doc = "Battery current, -1: autopilot does not measure the current"]
7217    pub current_battery: i16,
7218    #[doc = "Battery ID"]
7219    pub id: u8,
7220    #[doc = "Function of the battery"]
7221    pub battery_function: MavBatteryFunction,
7222    #[doc = "Type (chemistry) of the battery"]
7223    pub mavtype: MavBatteryType,
7224    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7225    pub battery_remaining: i8,
7226    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7228    pub time_remaining: i32,
7229    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7230    #[cfg_attr(feature = "serde", serde(default))]
7231    pub charge_state: MavBatteryChargeState,
7232    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7235    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7236    pub voltages_ext: [u16; 4],
7237    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7238    #[cfg_attr(feature = "serde", serde(default))]
7239    pub mode: MavBatteryMode,
7240    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7241    #[cfg_attr(feature = "serde", serde(default))]
7242    pub fault_bitmask: MavBatteryFault,
7243}
7244impl BATTERY_STATUS_DATA {
7245    pub const ENCODED_LEN: usize = 54usize;
7246    pub const DEFAULT: Self = Self {
7247        current_consumed: 0_i32,
7248        energy_consumed: 0_i32,
7249        temperature: 0_i16,
7250        voltages: [0_u16; 10usize],
7251        current_battery: 0_i16,
7252        id: 0_u8,
7253        battery_function: MavBatteryFunction::DEFAULT,
7254        mavtype: MavBatteryType::DEFAULT,
7255        battery_remaining: 0_i8,
7256        time_remaining: 0_i32,
7257        charge_state: MavBatteryChargeState::DEFAULT,
7258        voltages_ext: [0_u16; 4usize],
7259        mode: MavBatteryMode::DEFAULT,
7260        fault_bitmask: MavBatteryFault::DEFAULT,
7261    };
7262    #[cfg(feature = "arbitrary")]
7263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7264        use arbitrary::{Arbitrary, Unstructured};
7265        let mut buf = [0u8; 1024];
7266        rng.fill_bytes(&mut buf);
7267        let mut unstructured = Unstructured::new(&buf);
7268        Self::arbitrary(&mut unstructured).unwrap_or_default()
7269    }
7270}
7271impl Default for BATTERY_STATUS_DATA {
7272    fn default() -> Self {
7273        Self::DEFAULT.clone()
7274    }
7275}
7276impl MessageData for BATTERY_STATUS_DATA {
7277    type Message = MavMessage;
7278    const ID: u32 = 147u32;
7279    const NAME: &'static str = "BATTERY_STATUS";
7280    const EXTRA_CRC: u8 = 154u8;
7281    const ENCODED_LEN: usize = 54usize;
7282    fn deser(
7283        _version: MavlinkVersion,
7284        __input: &[u8],
7285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7286        let avail_len = __input.len();
7287        let mut payload_buf = [0; Self::ENCODED_LEN];
7288        let mut buf = if avail_len < Self::ENCODED_LEN {
7289            payload_buf[0..avail_len].copy_from_slice(__input);
7290            Bytes::new(&payload_buf)
7291        } else {
7292            Bytes::new(__input)
7293        };
7294        let mut __struct = Self::default();
7295        __struct.current_consumed = buf.get_i32_le();
7296        __struct.energy_consumed = buf.get_i32_le();
7297        __struct.temperature = buf.get_i16_le();
7298        for v in &mut __struct.voltages {
7299            let val = buf.get_u16_le();
7300            *v = val;
7301        }
7302        __struct.current_battery = buf.get_i16_le();
7303        __struct.id = buf.get_u8();
7304        let tmp = buf.get_u8();
7305        __struct.battery_function =
7306            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7307                enum_type: "MavBatteryFunction",
7308                value: tmp as u64,
7309            })?;
7310        let tmp = buf.get_u8();
7311        __struct.mavtype =
7312            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7313                enum_type: "MavBatteryType",
7314                value: tmp as u64,
7315            })?;
7316        __struct.battery_remaining = buf.get_i8();
7317        __struct.time_remaining = buf.get_i32_le();
7318        let tmp = buf.get_u8();
7319        __struct.charge_state =
7320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7321                enum_type: "MavBatteryChargeState",
7322                value: tmp as u64,
7323            })?;
7324        for v in &mut __struct.voltages_ext {
7325            let val = buf.get_u16_le();
7326            *v = val;
7327        }
7328        let tmp = buf.get_u8();
7329        __struct.mode =
7330            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7331                enum_type: "MavBatteryMode",
7332                value: tmp as u64,
7333            })?;
7334        let tmp = buf.get_u32_le();
7335        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp).ok_or(
7336            ::mavlink_core::error::ParserError::InvalidFlag {
7337                flag_type: "MavBatteryFault",
7338                value: tmp as u64,
7339            },
7340        )?;
7341        Ok(__struct)
7342    }
7343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7344        let mut __tmp = BytesMut::new(bytes);
7345        #[allow(clippy::absurd_extreme_comparisons)]
7346        #[allow(unused_comparisons)]
7347        if __tmp.remaining() < Self::ENCODED_LEN {
7348            panic!(
7349                "buffer is too small (need {} bytes, but got {})",
7350                Self::ENCODED_LEN,
7351                __tmp.remaining(),
7352            )
7353        }
7354        __tmp.put_i32_le(self.current_consumed);
7355        __tmp.put_i32_le(self.energy_consumed);
7356        __tmp.put_i16_le(self.temperature);
7357        for val in &self.voltages {
7358            __tmp.put_u16_le(*val);
7359        }
7360        __tmp.put_i16_le(self.current_battery);
7361        __tmp.put_u8(self.id);
7362        __tmp.put_u8(self.battery_function as u8);
7363        __tmp.put_u8(self.mavtype as u8);
7364        __tmp.put_i8(self.battery_remaining);
7365        if matches!(version, MavlinkVersion::V2) {
7366            __tmp.put_i32_le(self.time_remaining);
7367            __tmp.put_u8(self.charge_state as u8);
7368            for val in &self.voltages_ext {
7369                __tmp.put_u16_le(*val);
7370            }
7371            __tmp.put_u8(self.mode as u8);
7372            __tmp.put_u32_le(self.fault_bitmask.bits());
7373            let len = __tmp.len();
7374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7375        } else {
7376            __tmp.len()
7377        }
7378    }
7379}
7380#[doc = "Report button state change."]
7381#[doc = ""]
7382#[doc = "ID: 257"]
7383#[derive(Debug, Clone, PartialEq)]
7384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7386#[cfg_attr(feature = "ts", derive(TS))]
7387#[cfg_attr(feature = "ts", ts(export))]
7388pub struct BUTTON_CHANGE_DATA {
7389    #[doc = "Timestamp (time since system boot)."]
7390    pub time_boot_ms: u32,
7391    #[doc = "Time of last change of button state."]
7392    pub last_change_ms: u32,
7393    #[doc = "Bitmap for state of buttons."]
7394    pub state: u8,
7395}
7396impl BUTTON_CHANGE_DATA {
7397    pub const ENCODED_LEN: usize = 9usize;
7398    pub const DEFAULT: Self = Self {
7399        time_boot_ms: 0_u32,
7400        last_change_ms: 0_u32,
7401        state: 0_u8,
7402    };
7403    #[cfg(feature = "arbitrary")]
7404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7405        use arbitrary::{Arbitrary, Unstructured};
7406        let mut buf = [0u8; 1024];
7407        rng.fill_bytes(&mut buf);
7408        let mut unstructured = Unstructured::new(&buf);
7409        Self::arbitrary(&mut unstructured).unwrap_or_default()
7410    }
7411}
7412impl Default for BUTTON_CHANGE_DATA {
7413    fn default() -> Self {
7414        Self::DEFAULT.clone()
7415    }
7416}
7417impl MessageData for BUTTON_CHANGE_DATA {
7418    type Message = MavMessage;
7419    const ID: u32 = 257u32;
7420    const NAME: &'static str = "BUTTON_CHANGE";
7421    const EXTRA_CRC: u8 = 131u8;
7422    const ENCODED_LEN: usize = 9usize;
7423    fn deser(
7424        _version: MavlinkVersion,
7425        __input: &[u8],
7426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7427        let avail_len = __input.len();
7428        let mut payload_buf = [0; Self::ENCODED_LEN];
7429        let mut buf = if avail_len < Self::ENCODED_LEN {
7430            payload_buf[0..avail_len].copy_from_slice(__input);
7431            Bytes::new(&payload_buf)
7432        } else {
7433            Bytes::new(__input)
7434        };
7435        let mut __struct = Self::default();
7436        __struct.time_boot_ms = buf.get_u32_le();
7437        __struct.last_change_ms = buf.get_u32_le();
7438        __struct.state = buf.get_u8();
7439        Ok(__struct)
7440    }
7441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7442        let mut __tmp = BytesMut::new(bytes);
7443        #[allow(clippy::absurd_extreme_comparisons)]
7444        #[allow(unused_comparisons)]
7445        if __tmp.remaining() < Self::ENCODED_LEN {
7446            panic!(
7447                "buffer is too small (need {} bytes, but got {})",
7448                Self::ENCODED_LEN,
7449                __tmp.remaining(),
7450            )
7451        }
7452        __tmp.put_u32_le(self.time_boot_ms);
7453        __tmp.put_u32_le(self.last_change_ms);
7454        __tmp.put_u8(self.state);
7455        if matches!(version, MavlinkVersion::V2) {
7456            let len = __tmp.len();
7457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7458        } else {
7459            __tmp.len()
7460        }
7461    }
7462}
7463#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7464#[doc = ""]
7465#[doc = "ID: 262"]
7466#[derive(Debug, Clone, PartialEq)]
7467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7469#[cfg_attr(feature = "ts", derive(TS))]
7470#[cfg_attr(feature = "ts", ts(export))]
7471pub struct CAMERA_CAPTURE_STATUS_DATA {
7472    #[doc = "Timestamp (time since system boot)."]
7473    pub time_boot_ms: u32,
7474    #[doc = "Image capture interval"]
7475    pub image_interval: f32,
7476    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7477    pub recording_time_ms: u32,
7478    #[doc = "Available storage capacity."]
7479    pub available_capacity: f32,
7480    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7481    pub image_status: u8,
7482    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7483    pub video_status: u8,
7484    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7486    pub image_count: i32,
7487    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7489    pub camera_device_id: u8,
7490}
7491impl CAMERA_CAPTURE_STATUS_DATA {
7492    pub const ENCODED_LEN: usize = 23usize;
7493    pub const DEFAULT: Self = Self {
7494        time_boot_ms: 0_u32,
7495        image_interval: 0.0_f32,
7496        recording_time_ms: 0_u32,
7497        available_capacity: 0.0_f32,
7498        image_status: 0_u8,
7499        video_status: 0_u8,
7500        image_count: 0_i32,
7501        camera_device_id: 0_u8,
7502    };
7503    #[cfg(feature = "arbitrary")]
7504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7505        use arbitrary::{Arbitrary, Unstructured};
7506        let mut buf = [0u8; 1024];
7507        rng.fill_bytes(&mut buf);
7508        let mut unstructured = Unstructured::new(&buf);
7509        Self::arbitrary(&mut unstructured).unwrap_or_default()
7510    }
7511}
7512impl Default for CAMERA_CAPTURE_STATUS_DATA {
7513    fn default() -> Self {
7514        Self::DEFAULT.clone()
7515    }
7516}
7517impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7518    type Message = MavMessage;
7519    const ID: u32 = 262u32;
7520    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7521    const EXTRA_CRC: u8 = 12u8;
7522    const ENCODED_LEN: usize = 23usize;
7523    fn deser(
7524        _version: MavlinkVersion,
7525        __input: &[u8],
7526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7527        let avail_len = __input.len();
7528        let mut payload_buf = [0; Self::ENCODED_LEN];
7529        let mut buf = if avail_len < Self::ENCODED_LEN {
7530            payload_buf[0..avail_len].copy_from_slice(__input);
7531            Bytes::new(&payload_buf)
7532        } else {
7533            Bytes::new(__input)
7534        };
7535        let mut __struct = Self::default();
7536        __struct.time_boot_ms = buf.get_u32_le();
7537        __struct.image_interval = buf.get_f32_le();
7538        __struct.recording_time_ms = buf.get_u32_le();
7539        __struct.available_capacity = buf.get_f32_le();
7540        __struct.image_status = buf.get_u8();
7541        __struct.video_status = buf.get_u8();
7542        __struct.image_count = buf.get_i32_le();
7543        __struct.camera_device_id = buf.get_u8();
7544        Ok(__struct)
7545    }
7546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7547        let mut __tmp = BytesMut::new(bytes);
7548        #[allow(clippy::absurd_extreme_comparisons)]
7549        #[allow(unused_comparisons)]
7550        if __tmp.remaining() < Self::ENCODED_LEN {
7551            panic!(
7552                "buffer is too small (need {} bytes, but got {})",
7553                Self::ENCODED_LEN,
7554                __tmp.remaining(),
7555            )
7556        }
7557        __tmp.put_u32_le(self.time_boot_ms);
7558        __tmp.put_f32_le(self.image_interval);
7559        __tmp.put_u32_le(self.recording_time_ms);
7560        __tmp.put_f32_le(self.available_capacity);
7561        __tmp.put_u8(self.image_status);
7562        __tmp.put_u8(self.video_status);
7563        if matches!(version, MavlinkVersion::V2) {
7564            __tmp.put_i32_le(self.image_count);
7565            __tmp.put_u8(self.camera_device_id);
7566            let len = __tmp.len();
7567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7568        } else {
7569            __tmp.len()
7570        }
7571    }
7572}
7573#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7574#[doc = ""]
7575#[doc = "ID: 271"]
7576#[derive(Debug, Clone, PartialEq)]
7577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7579#[cfg_attr(feature = "ts", derive(TS))]
7580#[cfg_attr(feature = "ts", ts(export))]
7581pub struct CAMERA_FOV_STATUS_DATA {
7582    #[doc = "Timestamp (time since system boot)."]
7583    pub time_boot_ms: u32,
7584    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7585    pub lat_camera: i32,
7586    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7587    pub lon_camera: i32,
7588    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7589    pub alt_camera: i32,
7590    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7591    pub lat_image: i32,
7592    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7593    pub lon_image: i32,
7594    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7595    pub alt_image: i32,
7596    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7597    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7598    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7599    pub q: [f32; 4],
7600    #[doc = "Horizontal field of view (NaN if unknown)."]
7601    pub hfov: f32,
7602    #[doc = "Vertical field of view (NaN if unknown)."]
7603    pub vfov: f32,
7604    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7606    pub camera_device_id: u8,
7607}
7608impl CAMERA_FOV_STATUS_DATA {
7609    pub const ENCODED_LEN: usize = 53usize;
7610    pub const DEFAULT: Self = Self {
7611        time_boot_ms: 0_u32,
7612        lat_camera: 0_i32,
7613        lon_camera: 0_i32,
7614        alt_camera: 0_i32,
7615        lat_image: 0_i32,
7616        lon_image: 0_i32,
7617        alt_image: 0_i32,
7618        q: [0.0_f32; 4usize],
7619        hfov: 0.0_f32,
7620        vfov: 0.0_f32,
7621        camera_device_id: 0_u8,
7622    };
7623    #[cfg(feature = "arbitrary")]
7624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7625        use arbitrary::{Arbitrary, Unstructured};
7626        let mut buf = [0u8; 1024];
7627        rng.fill_bytes(&mut buf);
7628        let mut unstructured = Unstructured::new(&buf);
7629        Self::arbitrary(&mut unstructured).unwrap_or_default()
7630    }
7631}
7632impl Default for CAMERA_FOV_STATUS_DATA {
7633    fn default() -> Self {
7634        Self::DEFAULT.clone()
7635    }
7636}
7637impl MessageData for CAMERA_FOV_STATUS_DATA {
7638    type Message = MavMessage;
7639    const ID: u32 = 271u32;
7640    const NAME: &'static str = "CAMERA_FOV_STATUS";
7641    const EXTRA_CRC: u8 = 22u8;
7642    const ENCODED_LEN: usize = 53usize;
7643    fn deser(
7644        _version: MavlinkVersion,
7645        __input: &[u8],
7646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7647        let avail_len = __input.len();
7648        let mut payload_buf = [0; Self::ENCODED_LEN];
7649        let mut buf = if avail_len < Self::ENCODED_LEN {
7650            payload_buf[0..avail_len].copy_from_slice(__input);
7651            Bytes::new(&payload_buf)
7652        } else {
7653            Bytes::new(__input)
7654        };
7655        let mut __struct = Self::default();
7656        __struct.time_boot_ms = buf.get_u32_le();
7657        __struct.lat_camera = buf.get_i32_le();
7658        __struct.lon_camera = buf.get_i32_le();
7659        __struct.alt_camera = buf.get_i32_le();
7660        __struct.lat_image = buf.get_i32_le();
7661        __struct.lon_image = buf.get_i32_le();
7662        __struct.alt_image = buf.get_i32_le();
7663        for v in &mut __struct.q {
7664            let val = buf.get_f32_le();
7665            *v = val;
7666        }
7667        __struct.hfov = buf.get_f32_le();
7668        __struct.vfov = buf.get_f32_le();
7669        __struct.camera_device_id = buf.get_u8();
7670        Ok(__struct)
7671    }
7672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7673        let mut __tmp = BytesMut::new(bytes);
7674        #[allow(clippy::absurd_extreme_comparisons)]
7675        #[allow(unused_comparisons)]
7676        if __tmp.remaining() < Self::ENCODED_LEN {
7677            panic!(
7678                "buffer is too small (need {} bytes, but got {})",
7679                Self::ENCODED_LEN,
7680                __tmp.remaining(),
7681            )
7682        }
7683        __tmp.put_u32_le(self.time_boot_ms);
7684        __tmp.put_i32_le(self.lat_camera);
7685        __tmp.put_i32_le(self.lon_camera);
7686        __tmp.put_i32_le(self.alt_camera);
7687        __tmp.put_i32_le(self.lat_image);
7688        __tmp.put_i32_le(self.lon_image);
7689        __tmp.put_i32_le(self.alt_image);
7690        for val in &self.q {
7691            __tmp.put_f32_le(*val);
7692        }
7693        __tmp.put_f32_le(self.hfov);
7694        __tmp.put_f32_le(self.vfov);
7695        if matches!(version, MavlinkVersion::V2) {
7696            __tmp.put_u8(self.camera_device_id);
7697            let len = __tmp.len();
7698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7699        } else {
7700            __tmp.len()
7701        }
7702    }
7703}
7704#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7705#[doc = ""]
7706#[doc = "ID: 263"]
7707#[derive(Debug, Clone, PartialEq)]
7708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7710#[cfg_attr(feature = "ts", derive(TS))]
7711#[cfg_attr(feature = "ts", ts(export))]
7712pub struct CAMERA_IMAGE_CAPTURED_DATA {
7713    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7714    pub time_utc: u64,
7715    #[doc = "Timestamp (time since system boot)."]
7716    pub time_boot_ms: u32,
7717    #[doc = "Latitude where image was taken"]
7718    pub lat: i32,
7719    #[doc = "Longitude where capture was taken"]
7720    pub lon: i32,
7721    #[doc = "Altitude (MSL) where image was taken"]
7722    pub alt: i32,
7723    #[doc = "Altitude above ground"]
7724    pub relative_alt: i32,
7725    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7727    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7728    pub q: [f32; 4],
7729    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7730    pub image_index: i32,
7731    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7732    pub camera_id: u8,
7733    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7734    pub capture_result: i8,
7735    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7736    #[cfg_attr(feature = "ts", ts(type = "string"))]
7737    pub file_url: CharArray<205>,
7738}
7739impl CAMERA_IMAGE_CAPTURED_DATA {
7740    pub const ENCODED_LEN: usize = 255usize;
7741    pub const DEFAULT: Self = Self {
7742        time_utc: 0_u64,
7743        time_boot_ms: 0_u32,
7744        lat: 0_i32,
7745        lon: 0_i32,
7746        alt: 0_i32,
7747        relative_alt: 0_i32,
7748        q: [0.0_f32; 4usize],
7749        image_index: 0_i32,
7750        camera_id: 0_u8,
7751        capture_result: 0_i8,
7752        file_url: CharArray::new([0_u8; 205usize]),
7753    };
7754    #[cfg(feature = "arbitrary")]
7755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7756        use arbitrary::{Arbitrary, Unstructured};
7757        let mut buf = [0u8; 1024];
7758        rng.fill_bytes(&mut buf);
7759        let mut unstructured = Unstructured::new(&buf);
7760        Self::arbitrary(&mut unstructured).unwrap_or_default()
7761    }
7762}
7763impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7764    fn default() -> Self {
7765        Self::DEFAULT.clone()
7766    }
7767}
7768impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7769    type Message = MavMessage;
7770    const ID: u32 = 263u32;
7771    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7772    const EXTRA_CRC: u8 = 133u8;
7773    const ENCODED_LEN: usize = 255usize;
7774    fn deser(
7775        _version: MavlinkVersion,
7776        __input: &[u8],
7777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7778        let avail_len = __input.len();
7779        let mut payload_buf = [0; Self::ENCODED_LEN];
7780        let mut buf = if avail_len < Self::ENCODED_LEN {
7781            payload_buf[0..avail_len].copy_from_slice(__input);
7782            Bytes::new(&payload_buf)
7783        } else {
7784            Bytes::new(__input)
7785        };
7786        let mut __struct = Self::default();
7787        __struct.time_utc = buf.get_u64_le();
7788        __struct.time_boot_ms = buf.get_u32_le();
7789        __struct.lat = buf.get_i32_le();
7790        __struct.lon = buf.get_i32_le();
7791        __struct.alt = buf.get_i32_le();
7792        __struct.relative_alt = buf.get_i32_le();
7793        for v in &mut __struct.q {
7794            let val = buf.get_f32_le();
7795            *v = val;
7796        }
7797        __struct.image_index = buf.get_i32_le();
7798        __struct.camera_id = buf.get_u8();
7799        __struct.capture_result = buf.get_i8();
7800        let mut tmp = [0_u8; 205usize];
7801        for v in &mut tmp {
7802            *v = buf.get_u8();
7803        }
7804        __struct.file_url = CharArray::new(tmp);
7805        Ok(__struct)
7806    }
7807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7808        let mut __tmp = BytesMut::new(bytes);
7809        #[allow(clippy::absurd_extreme_comparisons)]
7810        #[allow(unused_comparisons)]
7811        if __tmp.remaining() < Self::ENCODED_LEN {
7812            panic!(
7813                "buffer is too small (need {} bytes, but got {})",
7814                Self::ENCODED_LEN,
7815                __tmp.remaining(),
7816            )
7817        }
7818        __tmp.put_u64_le(self.time_utc);
7819        __tmp.put_u32_le(self.time_boot_ms);
7820        __tmp.put_i32_le(self.lat);
7821        __tmp.put_i32_le(self.lon);
7822        __tmp.put_i32_le(self.alt);
7823        __tmp.put_i32_le(self.relative_alt);
7824        for val in &self.q {
7825            __tmp.put_f32_le(*val);
7826        }
7827        __tmp.put_i32_le(self.image_index);
7828        __tmp.put_u8(self.camera_id);
7829        __tmp.put_i8(self.capture_result);
7830        for val in &self.file_url {
7831            __tmp.put_u8(*val);
7832        }
7833        if matches!(version, MavlinkVersion::V2) {
7834            let len = __tmp.len();
7835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7836        } else {
7837            __tmp.len()
7838        }
7839    }
7840}
7841#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7842#[doc = ""]
7843#[doc = "ID: 259"]
7844#[derive(Debug, Clone, PartialEq)]
7845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7847#[cfg_attr(feature = "ts", derive(TS))]
7848#[cfg_attr(feature = "ts", ts(export))]
7849pub struct CAMERA_INFORMATION_DATA {
7850    #[doc = "Timestamp (time since system boot)."]
7851    pub time_boot_ms: u32,
7852    #[doc = "0xff). Use 0 if not known."]
7853    pub firmware_version: u32,
7854    #[doc = "Focal length. Use NaN if not known."]
7855    pub focal_length: f32,
7856    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7857    pub sensor_size_h: f32,
7858    #[doc = "Image sensor size vertical. Use NaN if not known."]
7859    pub sensor_size_v: f32,
7860    #[doc = "Bitmap of camera capability flags."]
7861    pub flags: CameraCapFlags,
7862    #[doc = "Horizontal image resolution. Use 0 if not known."]
7863    pub resolution_h: u16,
7864    #[doc = "Vertical image resolution. Use 0 if not known."]
7865    pub resolution_v: u16,
7866    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7867    pub cam_definition_version: u16,
7868    #[doc = "Name of the camera vendor"]
7869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7871    pub vendor_name: [u8; 32],
7872    #[doc = "Name of the camera model"]
7873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7874    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7875    pub model_name: [u8; 32],
7876    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7877    pub lens_id: u8,
7878    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7879    #[cfg_attr(feature = "ts", ts(type = "string"))]
7880    pub cam_definition_uri: CharArray<140>,
7881    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7883    pub gimbal_device_id: u8,
7884    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7885    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7886    pub camera_device_id: u8,
7887}
7888impl CAMERA_INFORMATION_DATA {
7889    pub const ENCODED_LEN: usize = 237usize;
7890    pub const DEFAULT: Self = Self {
7891        time_boot_ms: 0_u32,
7892        firmware_version: 0_u32,
7893        focal_length: 0.0_f32,
7894        sensor_size_h: 0.0_f32,
7895        sensor_size_v: 0.0_f32,
7896        flags: CameraCapFlags::DEFAULT,
7897        resolution_h: 0_u16,
7898        resolution_v: 0_u16,
7899        cam_definition_version: 0_u16,
7900        vendor_name: [0_u8; 32usize],
7901        model_name: [0_u8; 32usize],
7902        lens_id: 0_u8,
7903        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7904        gimbal_device_id: 0_u8,
7905        camera_device_id: 0_u8,
7906    };
7907    #[cfg(feature = "arbitrary")]
7908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7909        use arbitrary::{Arbitrary, Unstructured};
7910        let mut buf = [0u8; 1024];
7911        rng.fill_bytes(&mut buf);
7912        let mut unstructured = Unstructured::new(&buf);
7913        Self::arbitrary(&mut unstructured).unwrap_or_default()
7914    }
7915}
7916impl Default for CAMERA_INFORMATION_DATA {
7917    fn default() -> Self {
7918        Self::DEFAULT.clone()
7919    }
7920}
7921impl MessageData for CAMERA_INFORMATION_DATA {
7922    type Message = MavMessage;
7923    const ID: u32 = 259u32;
7924    const NAME: &'static str = "CAMERA_INFORMATION";
7925    const EXTRA_CRC: u8 = 92u8;
7926    const ENCODED_LEN: usize = 237usize;
7927    fn deser(
7928        _version: MavlinkVersion,
7929        __input: &[u8],
7930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7931        let avail_len = __input.len();
7932        let mut payload_buf = [0; Self::ENCODED_LEN];
7933        let mut buf = if avail_len < Self::ENCODED_LEN {
7934            payload_buf[0..avail_len].copy_from_slice(__input);
7935            Bytes::new(&payload_buf)
7936        } else {
7937            Bytes::new(__input)
7938        };
7939        let mut __struct = Self::default();
7940        __struct.time_boot_ms = buf.get_u32_le();
7941        __struct.firmware_version = buf.get_u32_le();
7942        __struct.focal_length = buf.get_f32_le();
7943        __struct.sensor_size_h = buf.get_f32_le();
7944        __struct.sensor_size_v = buf.get_f32_le();
7945        let tmp = buf.get_u32_le();
7946        __struct.flags = CameraCapFlags::from_bits(tmp).ok_or(
7947            ::mavlink_core::error::ParserError::InvalidFlag {
7948                flag_type: "CameraCapFlags",
7949                value: tmp as u64,
7950            },
7951        )?;
7952        __struct.resolution_h = buf.get_u16_le();
7953        __struct.resolution_v = buf.get_u16_le();
7954        __struct.cam_definition_version = buf.get_u16_le();
7955        for v in &mut __struct.vendor_name {
7956            let val = buf.get_u8();
7957            *v = val;
7958        }
7959        for v in &mut __struct.model_name {
7960            let val = buf.get_u8();
7961            *v = val;
7962        }
7963        __struct.lens_id = buf.get_u8();
7964        let mut tmp = [0_u8; 140usize];
7965        for v in &mut tmp {
7966            *v = buf.get_u8();
7967        }
7968        __struct.cam_definition_uri = CharArray::new(tmp);
7969        __struct.gimbal_device_id = buf.get_u8();
7970        __struct.camera_device_id = buf.get_u8();
7971        Ok(__struct)
7972    }
7973    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7974        let mut __tmp = BytesMut::new(bytes);
7975        #[allow(clippy::absurd_extreme_comparisons)]
7976        #[allow(unused_comparisons)]
7977        if __tmp.remaining() < Self::ENCODED_LEN {
7978            panic!(
7979                "buffer is too small (need {} bytes, but got {})",
7980                Self::ENCODED_LEN,
7981                __tmp.remaining(),
7982            )
7983        }
7984        __tmp.put_u32_le(self.time_boot_ms);
7985        __tmp.put_u32_le(self.firmware_version);
7986        __tmp.put_f32_le(self.focal_length);
7987        __tmp.put_f32_le(self.sensor_size_h);
7988        __tmp.put_f32_le(self.sensor_size_v);
7989        __tmp.put_u32_le(self.flags.bits());
7990        __tmp.put_u16_le(self.resolution_h);
7991        __tmp.put_u16_le(self.resolution_v);
7992        __tmp.put_u16_le(self.cam_definition_version);
7993        for val in &self.vendor_name {
7994            __tmp.put_u8(*val);
7995        }
7996        for val in &self.model_name {
7997            __tmp.put_u8(*val);
7998        }
7999        __tmp.put_u8(self.lens_id);
8000        for val in &self.cam_definition_uri {
8001            __tmp.put_u8(*val);
8002        }
8003        if matches!(version, MavlinkVersion::V2) {
8004            __tmp.put_u8(self.gimbal_device_id);
8005            __tmp.put_u8(self.camera_device_id);
8006            let len = __tmp.len();
8007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8008        } else {
8009            __tmp.len()
8010        }
8011    }
8012}
8013#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8014#[doc = ""]
8015#[doc = "ID: 260"]
8016#[derive(Debug, Clone, PartialEq)]
8017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8019#[cfg_attr(feature = "ts", derive(TS))]
8020#[cfg_attr(feature = "ts", ts(export))]
8021pub struct CAMERA_SETTINGS_DATA {
8022    #[doc = "Timestamp (time since system boot)."]
8023    pub time_boot_ms: u32,
8024    #[doc = "Camera mode"]
8025    pub mode_id: CameraMode,
8026    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8027    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8028    pub zoomLevel: f32,
8029    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8030    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8031    pub focusLevel: f32,
8032    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8033    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8034    pub camera_device_id: u8,
8035}
8036impl CAMERA_SETTINGS_DATA {
8037    pub const ENCODED_LEN: usize = 14usize;
8038    pub const DEFAULT: Self = Self {
8039        time_boot_ms: 0_u32,
8040        mode_id: CameraMode::DEFAULT,
8041        zoomLevel: 0.0_f32,
8042        focusLevel: 0.0_f32,
8043        camera_device_id: 0_u8,
8044    };
8045    #[cfg(feature = "arbitrary")]
8046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8047        use arbitrary::{Arbitrary, Unstructured};
8048        let mut buf = [0u8; 1024];
8049        rng.fill_bytes(&mut buf);
8050        let mut unstructured = Unstructured::new(&buf);
8051        Self::arbitrary(&mut unstructured).unwrap_or_default()
8052    }
8053}
8054impl Default for CAMERA_SETTINGS_DATA {
8055    fn default() -> Self {
8056        Self::DEFAULT.clone()
8057    }
8058}
8059impl MessageData for CAMERA_SETTINGS_DATA {
8060    type Message = MavMessage;
8061    const ID: u32 = 260u32;
8062    const NAME: &'static str = "CAMERA_SETTINGS";
8063    const EXTRA_CRC: u8 = 146u8;
8064    const ENCODED_LEN: usize = 14usize;
8065    fn deser(
8066        _version: MavlinkVersion,
8067        __input: &[u8],
8068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8069        let avail_len = __input.len();
8070        let mut payload_buf = [0; Self::ENCODED_LEN];
8071        let mut buf = if avail_len < Self::ENCODED_LEN {
8072            payload_buf[0..avail_len].copy_from_slice(__input);
8073            Bytes::new(&payload_buf)
8074        } else {
8075            Bytes::new(__input)
8076        };
8077        let mut __struct = Self::default();
8078        __struct.time_boot_ms = buf.get_u32_le();
8079        let tmp = buf.get_u8();
8080        __struct.mode_id =
8081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8082                enum_type: "CameraMode",
8083                value: tmp as u64,
8084            })?;
8085        __struct.zoomLevel = buf.get_f32_le();
8086        __struct.focusLevel = buf.get_f32_le();
8087        __struct.camera_device_id = buf.get_u8();
8088        Ok(__struct)
8089    }
8090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8091        let mut __tmp = BytesMut::new(bytes);
8092        #[allow(clippy::absurd_extreme_comparisons)]
8093        #[allow(unused_comparisons)]
8094        if __tmp.remaining() < Self::ENCODED_LEN {
8095            panic!(
8096                "buffer is too small (need {} bytes, but got {})",
8097                Self::ENCODED_LEN,
8098                __tmp.remaining(),
8099            )
8100        }
8101        __tmp.put_u32_le(self.time_boot_ms);
8102        __tmp.put_u8(self.mode_id as u8);
8103        if matches!(version, MavlinkVersion::V2) {
8104            __tmp.put_f32_le(self.zoomLevel);
8105            __tmp.put_f32_le(self.focusLevel);
8106            __tmp.put_u8(self.camera_device_id);
8107            let len = __tmp.len();
8108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8109        } else {
8110            __tmp.len()
8111        }
8112    }
8113}
8114#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8115#[doc = ""]
8116#[doc = "ID: 277"]
8117#[derive(Debug, Clone, PartialEq)]
8118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8120#[cfg_attr(feature = "ts", derive(TS))]
8121#[cfg_attr(feature = "ts", ts(export))]
8122pub struct CAMERA_THERMAL_RANGE_DATA {
8123    #[doc = "Timestamp (time since system boot)."]
8124    pub time_boot_ms: u32,
8125    #[doc = "Temperature max."]
8126    pub max: f32,
8127    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8128    pub max_point_x: f32,
8129    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8130    pub max_point_y: f32,
8131    #[doc = "Temperature min."]
8132    pub min: f32,
8133    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8134    pub min_point_x: f32,
8135    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8136    pub min_point_y: f32,
8137    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8138    pub stream_id: u8,
8139    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8140    pub camera_device_id: u8,
8141}
8142impl CAMERA_THERMAL_RANGE_DATA {
8143    pub const ENCODED_LEN: usize = 30usize;
8144    pub const DEFAULT: Self = Self {
8145        time_boot_ms: 0_u32,
8146        max: 0.0_f32,
8147        max_point_x: 0.0_f32,
8148        max_point_y: 0.0_f32,
8149        min: 0.0_f32,
8150        min_point_x: 0.0_f32,
8151        min_point_y: 0.0_f32,
8152        stream_id: 0_u8,
8153        camera_device_id: 0_u8,
8154    };
8155    #[cfg(feature = "arbitrary")]
8156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8157        use arbitrary::{Arbitrary, Unstructured};
8158        let mut buf = [0u8; 1024];
8159        rng.fill_bytes(&mut buf);
8160        let mut unstructured = Unstructured::new(&buf);
8161        Self::arbitrary(&mut unstructured).unwrap_or_default()
8162    }
8163}
8164impl Default for CAMERA_THERMAL_RANGE_DATA {
8165    fn default() -> Self {
8166        Self::DEFAULT.clone()
8167    }
8168}
8169impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8170    type Message = MavMessage;
8171    const ID: u32 = 277u32;
8172    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8173    const EXTRA_CRC: u8 = 62u8;
8174    const ENCODED_LEN: usize = 30usize;
8175    fn deser(
8176        _version: MavlinkVersion,
8177        __input: &[u8],
8178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8179        let avail_len = __input.len();
8180        let mut payload_buf = [0; Self::ENCODED_LEN];
8181        let mut buf = if avail_len < Self::ENCODED_LEN {
8182            payload_buf[0..avail_len].copy_from_slice(__input);
8183            Bytes::new(&payload_buf)
8184        } else {
8185            Bytes::new(__input)
8186        };
8187        let mut __struct = Self::default();
8188        __struct.time_boot_ms = buf.get_u32_le();
8189        __struct.max = buf.get_f32_le();
8190        __struct.max_point_x = buf.get_f32_le();
8191        __struct.max_point_y = buf.get_f32_le();
8192        __struct.min = buf.get_f32_le();
8193        __struct.min_point_x = buf.get_f32_le();
8194        __struct.min_point_y = buf.get_f32_le();
8195        __struct.stream_id = buf.get_u8();
8196        __struct.camera_device_id = buf.get_u8();
8197        Ok(__struct)
8198    }
8199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8200        let mut __tmp = BytesMut::new(bytes);
8201        #[allow(clippy::absurd_extreme_comparisons)]
8202        #[allow(unused_comparisons)]
8203        if __tmp.remaining() < Self::ENCODED_LEN {
8204            panic!(
8205                "buffer is too small (need {} bytes, but got {})",
8206                Self::ENCODED_LEN,
8207                __tmp.remaining(),
8208            )
8209        }
8210        __tmp.put_u32_le(self.time_boot_ms);
8211        __tmp.put_f32_le(self.max);
8212        __tmp.put_f32_le(self.max_point_x);
8213        __tmp.put_f32_le(self.max_point_y);
8214        __tmp.put_f32_le(self.min);
8215        __tmp.put_f32_le(self.min_point_x);
8216        __tmp.put_f32_le(self.min_point_y);
8217        __tmp.put_u8(self.stream_id);
8218        __tmp.put_u8(self.camera_device_id);
8219        if matches!(version, MavlinkVersion::V2) {
8220            let len = __tmp.len();
8221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8222        } else {
8223            __tmp.len()
8224        }
8225    }
8226}
8227#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8228#[doc = ""]
8229#[doc = "ID: 276"]
8230#[derive(Debug, Clone, PartialEq)]
8231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8233#[cfg_attr(feature = "ts", derive(TS))]
8234#[cfg_attr(feature = "ts", ts(export))]
8235pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8236    #[doc = "Latitude of tracked object"]
8237    pub lat: i32,
8238    #[doc = "Longitude of tracked object"]
8239    pub lon: i32,
8240    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8241    pub alt: f32,
8242    #[doc = "Horizontal accuracy. NAN if unknown"]
8243    pub h_acc: f32,
8244    #[doc = "Vertical accuracy. NAN if unknown"]
8245    pub v_acc: f32,
8246    #[doc = "North velocity of tracked object. NAN if unknown"]
8247    pub vel_n: f32,
8248    #[doc = "East velocity of tracked object. NAN if unknown"]
8249    pub vel_e: f32,
8250    #[doc = "Down velocity of tracked object. NAN if unknown"]
8251    pub vel_d: f32,
8252    #[doc = "Velocity accuracy. NAN if unknown"]
8253    pub vel_acc: f32,
8254    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8255    pub dist: f32,
8256    #[doc = "Heading in radians, in NED. NAN if unknown"]
8257    pub hdg: f32,
8258    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8259    pub hdg_acc: f32,
8260    #[doc = "Current tracking status"]
8261    pub tracking_status: CameraTrackingStatusFlags,
8262    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8264    pub camera_device_id: u8,
8265}
8266impl CAMERA_TRACKING_GEO_STATUS_DATA {
8267    pub const ENCODED_LEN: usize = 50usize;
8268    pub const DEFAULT: Self = Self {
8269        lat: 0_i32,
8270        lon: 0_i32,
8271        alt: 0.0_f32,
8272        h_acc: 0.0_f32,
8273        v_acc: 0.0_f32,
8274        vel_n: 0.0_f32,
8275        vel_e: 0.0_f32,
8276        vel_d: 0.0_f32,
8277        vel_acc: 0.0_f32,
8278        dist: 0.0_f32,
8279        hdg: 0.0_f32,
8280        hdg_acc: 0.0_f32,
8281        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8282        camera_device_id: 0_u8,
8283    };
8284    #[cfg(feature = "arbitrary")]
8285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8286        use arbitrary::{Arbitrary, Unstructured};
8287        let mut buf = [0u8; 1024];
8288        rng.fill_bytes(&mut buf);
8289        let mut unstructured = Unstructured::new(&buf);
8290        Self::arbitrary(&mut unstructured).unwrap_or_default()
8291    }
8292}
8293impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8294    fn default() -> Self {
8295        Self::DEFAULT.clone()
8296    }
8297}
8298impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8299    type Message = MavMessage;
8300    const ID: u32 = 276u32;
8301    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8302    const EXTRA_CRC: u8 = 18u8;
8303    const ENCODED_LEN: usize = 50usize;
8304    fn deser(
8305        _version: MavlinkVersion,
8306        __input: &[u8],
8307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8308        let avail_len = __input.len();
8309        let mut payload_buf = [0; Self::ENCODED_LEN];
8310        let mut buf = if avail_len < Self::ENCODED_LEN {
8311            payload_buf[0..avail_len].copy_from_slice(__input);
8312            Bytes::new(&payload_buf)
8313        } else {
8314            Bytes::new(__input)
8315        };
8316        let mut __struct = Self::default();
8317        __struct.lat = buf.get_i32_le();
8318        __struct.lon = buf.get_i32_le();
8319        __struct.alt = buf.get_f32_le();
8320        __struct.h_acc = buf.get_f32_le();
8321        __struct.v_acc = buf.get_f32_le();
8322        __struct.vel_n = buf.get_f32_le();
8323        __struct.vel_e = buf.get_f32_le();
8324        __struct.vel_d = buf.get_f32_le();
8325        __struct.vel_acc = buf.get_f32_le();
8326        __struct.dist = buf.get_f32_le();
8327        __struct.hdg = buf.get_f32_le();
8328        __struct.hdg_acc = buf.get_f32_le();
8329        let tmp = buf.get_u8();
8330        __struct.tracking_status =
8331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8332                enum_type: "CameraTrackingStatusFlags",
8333                value: tmp as u64,
8334            })?;
8335        __struct.camera_device_id = buf.get_u8();
8336        Ok(__struct)
8337    }
8338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8339        let mut __tmp = BytesMut::new(bytes);
8340        #[allow(clippy::absurd_extreme_comparisons)]
8341        #[allow(unused_comparisons)]
8342        if __tmp.remaining() < Self::ENCODED_LEN {
8343            panic!(
8344                "buffer is too small (need {} bytes, but got {})",
8345                Self::ENCODED_LEN,
8346                __tmp.remaining(),
8347            )
8348        }
8349        __tmp.put_i32_le(self.lat);
8350        __tmp.put_i32_le(self.lon);
8351        __tmp.put_f32_le(self.alt);
8352        __tmp.put_f32_le(self.h_acc);
8353        __tmp.put_f32_le(self.v_acc);
8354        __tmp.put_f32_le(self.vel_n);
8355        __tmp.put_f32_le(self.vel_e);
8356        __tmp.put_f32_le(self.vel_d);
8357        __tmp.put_f32_le(self.vel_acc);
8358        __tmp.put_f32_le(self.dist);
8359        __tmp.put_f32_le(self.hdg);
8360        __tmp.put_f32_le(self.hdg_acc);
8361        __tmp.put_u8(self.tracking_status as u8);
8362        if matches!(version, MavlinkVersion::V2) {
8363            __tmp.put_u8(self.camera_device_id);
8364            let len = __tmp.len();
8365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8366        } else {
8367            __tmp.len()
8368        }
8369    }
8370}
8371#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8372#[doc = ""]
8373#[doc = "ID: 275"]
8374#[derive(Debug, Clone, PartialEq)]
8375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8377#[cfg_attr(feature = "ts", derive(TS))]
8378#[cfg_attr(feature = "ts", ts(export))]
8379pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8380    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8381    pub point_x: f32,
8382    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8383    pub point_y: f32,
8384    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8385    pub radius: f32,
8386    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8387    pub rec_top_x: f32,
8388    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8389    pub rec_top_y: f32,
8390    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8391    pub rec_bottom_x: f32,
8392    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8393    pub rec_bottom_y: f32,
8394    #[doc = "Current tracking status"]
8395    pub tracking_status: CameraTrackingStatusFlags,
8396    #[doc = "Current tracking mode"]
8397    pub tracking_mode: CameraTrackingMode,
8398    #[doc = "Defines location of target data"]
8399    pub target_data: CameraTrackingTargetData,
8400    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8402    pub camera_device_id: u8,
8403}
8404impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8405    pub const ENCODED_LEN: usize = 32usize;
8406    pub const DEFAULT: Self = Self {
8407        point_x: 0.0_f32,
8408        point_y: 0.0_f32,
8409        radius: 0.0_f32,
8410        rec_top_x: 0.0_f32,
8411        rec_top_y: 0.0_f32,
8412        rec_bottom_x: 0.0_f32,
8413        rec_bottom_y: 0.0_f32,
8414        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8415        tracking_mode: CameraTrackingMode::DEFAULT,
8416        target_data: CameraTrackingTargetData::DEFAULT,
8417        camera_device_id: 0_u8,
8418    };
8419    #[cfg(feature = "arbitrary")]
8420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8421        use arbitrary::{Arbitrary, Unstructured};
8422        let mut buf = [0u8; 1024];
8423        rng.fill_bytes(&mut buf);
8424        let mut unstructured = Unstructured::new(&buf);
8425        Self::arbitrary(&mut unstructured).unwrap_or_default()
8426    }
8427}
8428impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8429    fn default() -> Self {
8430        Self::DEFAULT.clone()
8431    }
8432}
8433impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8434    type Message = MavMessage;
8435    const ID: u32 = 275u32;
8436    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8437    const EXTRA_CRC: u8 = 126u8;
8438    const ENCODED_LEN: usize = 32usize;
8439    fn deser(
8440        _version: MavlinkVersion,
8441        __input: &[u8],
8442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8443        let avail_len = __input.len();
8444        let mut payload_buf = [0; Self::ENCODED_LEN];
8445        let mut buf = if avail_len < Self::ENCODED_LEN {
8446            payload_buf[0..avail_len].copy_from_slice(__input);
8447            Bytes::new(&payload_buf)
8448        } else {
8449            Bytes::new(__input)
8450        };
8451        let mut __struct = Self::default();
8452        __struct.point_x = buf.get_f32_le();
8453        __struct.point_y = buf.get_f32_le();
8454        __struct.radius = buf.get_f32_le();
8455        __struct.rec_top_x = buf.get_f32_le();
8456        __struct.rec_top_y = buf.get_f32_le();
8457        __struct.rec_bottom_x = buf.get_f32_le();
8458        __struct.rec_bottom_y = buf.get_f32_le();
8459        let tmp = buf.get_u8();
8460        __struct.tracking_status =
8461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8462                enum_type: "CameraTrackingStatusFlags",
8463                value: tmp as u64,
8464            })?;
8465        let tmp = buf.get_u8();
8466        __struct.tracking_mode =
8467            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8468                enum_type: "CameraTrackingMode",
8469                value: tmp as u64,
8470            })?;
8471        let tmp = buf.get_u8();
8472        __struct.target_data = CameraTrackingTargetData::from_bits(tmp).ok_or(
8473            ::mavlink_core::error::ParserError::InvalidFlag {
8474                flag_type: "CameraTrackingTargetData",
8475                value: tmp as u64,
8476            },
8477        )?;
8478        __struct.camera_device_id = buf.get_u8();
8479        Ok(__struct)
8480    }
8481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8482        let mut __tmp = BytesMut::new(bytes);
8483        #[allow(clippy::absurd_extreme_comparisons)]
8484        #[allow(unused_comparisons)]
8485        if __tmp.remaining() < Self::ENCODED_LEN {
8486            panic!(
8487                "buffer is too small (need {} bytes, but got {})",
8488                Self::ENCODED_LEN,
8489                __tmp.remaining(),
8490            )
8491        }
8492        __tmp.put_f32_le(self.point_x);
8493        __tmp.put_f32_le(self.point_y);
8494        __tmp.put_f32_le(self.radius);
8495        __tmp.put_f32_le(self.rec_top_x);
8496        __tmp.put_f32_le(self.rec_top_y);
8497        __tmp.put_f32_le(self.rec_bottom_x);
8498        __tmp.put_f32_le(self.rec_bottom_y);
8499        __tmp.put_u8(self.tracking_status as u8);
8500        __tmp.put_u8(self.tracking_mode as u8);
8501        __tmp.put_u8(self.target_data.bits());
8502        if matches!(version, MavlinkVersion::V2) {
8503            __tmp.put_u8(self.camera_device_id);
8504            let len = __tmp.len();
8505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8506        } else {
8507            __tmp.len()
8508        }
8509    }
8510}
8511#[doc = "Camera-IMU triggering and synchronisation message."]
8512#[doc = ""]
8513#[doc = "ID: 112"]
8514#[derive(Debug, Clone, PartialEq)]
8515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8517#[cfg_attr(feature = "ts", derive(TS))]
8518#[cfg_attr(feature = "ts", ts(export))]
8519pub struct CAMERA_TRIGGER_DATA {
8520    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8521    pub time_usec: u64,
8522    #[doc = "Image frame sequence"]
8523    pub seq: u32,
8524}
8525impl CAMERA_TRIGGER_DATA {
8526    pub const ENCODED_LEN: usize = 12usize;
8527    pub const DEFAULT: Self = Self {
8528        time_usec: 0_u64,
8529        seq: 0_u32,
8530    };
8531    #[cfg(feature = "arbitrary")]
8532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8533        use arbitrary::{Arbitrary, Unstructured};
8534        let mut buf = [0u8; 1024];
8535        rng.fill_bytes(&mut buf);
8536        let mut unstructured = Unstructured::new(&buf);
8537        Self::arbitrary(&mut unstructured).unwrap_or_default()
8538    }
8539}
8540impl Default for CAMERA_TRIGGER_DATA {
8541    fn default() -> Self {
8542        Self::DEFAULT.clone()
8543    }
8544}
8545impl MessageData for CAMERA_TRIGGER_DATA {
8546    type Message = MavMessage;
8547    const ID: u32 = 112u32;
8548    const NAME: &'static str = "CAMERA_TRIGGER";
8549    const EXTRA_CRC: u8 = 174u8;
8550    const ENCODED_LEN: usize = 12usize;
8551    fn deser(
8552        _version: MavlinkVersion,
8553        __input: &[u8],
8554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8555        let avail_len = __input.len();
8556        let mut payload_buf = [0; Self::ENCODED_LEN];
8557        let mut buf = if avail_len < Self::ENCODED_LEN {
8558            payload_buf[0..avail_len].copy_from_slice(__input);
8559            Bytes::new(&payload_buf)
8560        } else {
8561            Bytes::new(__input)
8562        };
8563        let mut __struct = Self::default();
8564        __struct.time_usec = buf.get_u64_le();
8565        __struct.seq = buf.get_u32_le();
8566        Ok(__struct)
8567    }
8568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8569        let mut __tmp = BytesMut::new(bytes);
8570        #[allow(clippy::absurd_extreme_comparisons)]
8571        #[allow(unused_comparisons)]
8572        if __tmp.remaining() < Self::ENCODED_LEN {
8573            panic!(
8574                "buffer is too small (need {} bytes, but got {})",
8575                Self::ENCODED_LEN,
8576                __tmp.remaining(),
8577            )
8578        }
8579        __tmp.put_u64_le(self.time_usec);
8580        __tmp.put_u32_le(self.seq);
8581        if matches!(version, MavlinkVersion::V2) {
8582            let len = __tmp.len();
8583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8584        } else {
8585            __tmp.len()
8586        }
8587    }
8588}
8589#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8590#[doc = ""]
8591#[doc = "ID: 387"]
8592#[derive(Debug, Clone, PartialEq)]
8593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8595#[cfg_attr(feature = "ts", derive(TS))]
8596#[cfg_attr(feature = "ts", ts(export))]
8597pub struct CANFD_FRAME_DATA {
8598    #[doc = "Frame ID"]
8599    pub id: u32,
8600    #[doc = "System ID."]
8601    pub target_system: u8,
8602    #[doc = "Component ID."]
8603    pub target_component: u8,
8604    #[doc = "bus number"]
8605    pub bus: u8,
8606    #[doc = "Frame length"]
8607    pub len: u8,
8608    #[doc = "Frame data"]
8609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8611    pub data: [u8; 64],
8612}
8613impl CANFD_FRAME_DATA {
8614    pub const ENCODED_LEN: usize = 72usize;
8615    pub const DEFAULT: Self = Self {
8616        id: 0_u32,
8617        target_system: 0_u8,
8618        target_component: 0_u8,
8619        bus: 0_u8,
8620        len: 0_u8,
8621        data: [0_u8; 64usize],
8622    };
8623    #[cfg(feature = "arbitrary")]
8624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8625        use arbitrary::{Arbitrary, Unstructured};
8626        let mut buf = [0u8; 1024];
8627        rng.fill_bytes(&mut buf);
8628        let mut unstructured = Unstructured::new(&buf);
8629        Self::arbitrary(&mut unstructured).unwrap_or_default()
8630    }
8631}
8632impl Default for CANFD_FRAME_DATA {
8633    fn default() -> Self {
8634        Self::DEFAULT.clone()
8635    }
8636}
8637impl MessageData for CANFD_FRAME_DATA {
8638    type Message = MavMessage;
8639    const ID: u32 = 387u32;
8640    const NAME: &'static str = "CANFD_FRAME";
8641    const EXTRA_CRC: u8 = 4u8;
8642    const ENCODED_LEN: usize = 72usize;
8643    fn deser(
8644        _version: MavlinkVersion,
8645        __input: &[u8],
8646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8647        let avail_len = __input.len();
8648        let mut payload_buf = [0; Self::ENCODED_LEN];
8649        let mut buf = if avail_len < Self::ENCODED_LEN {
8650            payload_buf[0..avail_len].copy_from_slice(__input);
8651            Bytes::new(&payload_buf)
8652        } else {
8653            Bytes::new(__input)
8654        };
8655        let mut __struct = Self::default();
8656        __struct.id = buf.get_u32_le();
8657        __struct.target_system = buf.get_u8();
8658        __struct.target_component = buf.get_u8();
8659        __struct.bus = buf.get_u8();
8660        __struct.len = buf.get_u8();
8661        for v in &mut __struct.data {
8662            let val = buf.get_u8();
8663            *v = val;
8664        }
8665        Ok(__struct)
8666    }
8667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8668        let mut __tmp = BytesMut::new(bytes);
8669        #[allow(clippy::absurd_extreme_comparisons)]
8670        #[allow(unused_comparisons)]
8671        if __tmp.remaining() < Self::ENCODED_LEN {
8672            panic!(
8673                "buffer is too small (need {} bytes, but got {})",
8674                Self::ENCODED_LEN,
8675                __tmp.remaining(),
8676            )
8677        }
8678        __tmp.put_u32_le(self.id);
8679        __tmp.put_u8(self.target_system);
8680        __tmp.put_u8(self.target_component);
8681        __tmp.put_u8(self.bus);
8682        __tmp.put_u8(self.len);
8683        for val in &self.data {
8684            __tmp.put_u8(*val);
8685        }
8686        if matches!(version, MavlinkVersion::V2) {
8687            let len = __tmp.len();
8688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8689        } else {
8690            __tmp.len()
8691        }
8692    }
8693}
8694#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8695#[doc = ""]
8696#[doc = "ID: 388"]
8697#[derive(Debug, Clone, PartialEq)]
8698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8700#[cfg_attr(feature = "ts", derive(TS))]
8701#[cfg_attr(feature = "ts", ts(export))]
8702pub struct CAN_FILTER_MODIFY_DATA {
8703    #[doc = "filter IDs, length num_ids"]
8704    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8705    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8706    pub ids: [u16; 16],
8707    #[doc = "System ID."]
8708    pub target_system: u8,
8709    #[doc = "Component ID."]
8710    pub target_component: u8,
8711    #[doc = "bus number"]
8712    pub bus: u8,
8713    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8714    pub operation: CanFilterOp,
8715    #[doc = "number of IDs in filter list"]
8716    pub num_ids: u8,
8717}
8718impl CAN_FILTER_MODIFY_DATA {
8719    pub const ENCODED_LEN: usize = 37usize;
8720    pub const DEFAULT: Self = Self {
8721        ids: [0_u16; 16usize],
8722        target_system: 0_u8,
8723        target_component: 0_u8,
8724        bus: 0_u8,
8725        operation: CanFilterOp::DEFAULT,
8726        num_ids: 0_u8,
8727    };
8728    #[cfg(feature = "arbitrary")]
8729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8730        use arbitrary::{Arbitrary, Unstructured};
8731        let mut buf = [0u8; 1024];
8732        rng.fill_bytes(&mut buf);
8733        let mut unstructured = Unstructured::new(&buf);
8734        Self::arbitrary(&mut unstructured).unwrap_or_default()
8735    }
8736}
8737impl Default for CAN_FILTER_MODIFY_DATA {
8738    fn default() -> Self {
8739        Self::DEFAULT.clone()
8740    }
8741}
8742impl MessageData for CAN_FILTER_MODIFY_DATA {
8743    type Message = MavMessage;
8744    const ID: u32 = 388u32;
8745    const NAME: &'static str = "CAN_FILTER_MODIFY";
8746    const EXTRA_CRC: u8 = 8u8;
8747    const ENCODED_LEN: usize = 37usize;
8748    fn deser(
8749        _version: MavlinkVersion,
8750        __input: &[u8],
8751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8752        let avail_len = __input.len();
8753        let mut payload_buf = [0; Self::ENCODED_LEN];
8754        let mut buf = if avail_len < Self::ENCODED_LEN {
8755            payload_buf[0..avail_len].copy_from_slice(__input);
8756            Bytes::new(&payload_buf)
8757        } else {
8758            Bytes::new(__input)
8759        };
8760        let mut __struct = Self::default();
8761        for v in &mut __struct.ids {
8762            let val = buf.get_u16_le();
8763            *v = val;
8764        }
8765        __struct.target_system = buf.get_u8();
8766        __struct.target_component = buf.get_u8();
8767        __struct.bus = buf.get_u8();
8768        let tmp = buf.get_u8();
8769        __struct.operation =
8770            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8771                enum_type: "CanFilterOp",
8772                value: tmp as u64,
8773            })?;
8774        __struct.num_ids = buf.get_u8();
8775        Ok(__struct)
8776    }
8777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8778        let mut __tmp = BytesMut::new(bytes);
8779        #[allow(clippy::absurd_extreme_comparisons)]
8780        #[allow(unused_comparisons)]
8781        if __tmp.remaining() < Self::ENCODED_LEN {
8782            panic!(
8783                "buffer is too small (need {} bytes, but got {})",
8784                Self::ENCODED_LEN,
8785                __tmp.remaining(),
8786            )
8787        }
8788        for val in &self.ids {
8789            __tmp.put_u16_le(*val);
8790        }
8791        __tmp.put_u8(self.target_system);
8792        __tmp.put_u8(self.target_component);
8793        __tmp.put_u8(self.bus);
8794        __tmp.put_u8(self.operation as u8);
8795        __tmp.put_u8(self.num_ids);
8796        if matches!(version, MavlinkVersion::V2) {
8797            let len = __tmp.len();
8798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8799        } else {
8800            __tmp.len()
8801        }
8802    }
8803}
8804#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8805#[doc = ""]
8806#[doc = "ID: 386"]
8807#[derive(Debug, Clone, PartialEq)]
8808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8810#[cfg_attr(feature = "ts", derive(TS))]
8811#[cfg_attr(feature = "ts", ts(export))]
8812pub struct CAN_FRAME_DATA {
8813    #[doc = "Frame ID"]
8814    pub id: u32,
8815    #[doc = "System ID."]
8816    pub target_system: u8,
8817    #[doc = "Component ID."]
8818    pub target_component: u8,
8819    #[doc = "Bus number"]
8820    pub bus: u8,
8821    #[doc = "Frame length"]
8822    pub len: u8,
8823    #[doc = "Frame data"]
8824    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8825    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8826    pub data: [u8; 8],
8827}
8828impl CAN_FRAME_DATA {
8829    pub const ENCODED_LEN: usize = 16usize;
8830    pub const DEFAULT: Self = Self {
8831        id: 0_u32,
8832        target_system: 0_u8,
8833        target_component: 0_u8,
8834        bus: 0_u8,
8835        len: 0_u8,
8836        data: [0_u8; 8usize],
8837    };
8838    #[cfg(feature = "arbitrary")]
8839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8840        use arbitrary::{Arbitrary, Unstructured};
8841        let mut buf = [0u8; 1024];
8842        rng.fill_bytes(&mut buf);
8843        let mut unstructured = Unstructured::new(&buf);
8844        Self::arbitrary(&mut unstructured).unwrap_or_default()
8845    }
8846}
8847impl Default for CAN_FRAME_DATA {
8848    fn default() -> Self {
8849        Self::DEFAULT.clone()
8850    }
8851}
8852impl MessageData for CAN_FRAME_DATA {
8853    type Message = MavMessage;
8854    const ID: u32 = 386u32;
8855    const NAME: &'static str = "CAN_FRAME";
8856    const EXTRA_CRC: u8 = 132u8;
8857    const ENCODED_LEN: usize = 16usize;
8858    fn deser(
8859        _version: MavlinkVersion,
8860        __input: &[u8],
8861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8862        let avail_len = __input.len();
8863        let mut payload_buf = [0; Self::ENCODED_LEN];
8864        let mut buf = if avail_len < Self::ENCODED_LEN {
8865            payload_buf[0..avail_len].copy_from_slice(__input);
8866            Bytes::new(&payload_buf)
8867        } else {
8868            Bytes::new(__input)
8869        };
8870        let mut __struct = Self::default();
8871        __struct.id = buf.get_u32_le();
8872        __struct.target_system = buf.get_u8();
8873        __struct.target_component = buf.get_u8();
8874        __struct.bus = buf.get_u8();
8875        __struct.len = buf.get_u8();
8876        for v in &mut __struct.data {
8877            let val = buf.get_u8();
8878            *v = val;
8879        }
8880        Ok(__struct)
8881    }
8882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8883        let mut __tmp = BytesMut::new(bytes);
8884        #[allow(clippy::absurd_extreme_comparisons)]
8885        #[allow(unused_comparisons)]
8886        if __tmp.remaining() < Self::ENCODED_LEN {
8887            panic!(
8888                "buffer is too small (need {} bytes, but got {})",
8889                Self::ENCODED_LEN,
8890                __tmp.remaining(),
8891            )
8892        }
8893        __tmp.put_u32_le(self.id);
8894        __tmp.put_u8(self.target_system);
8895        __tmp.put_u8(self.target_component);
8896        __tmp.put_u8(self.bus);
8897        __tmp.put_u8(self.len);
8898        for val in &self.data {
8899            __tmp.put_u8(*val);
8900        }
8901        if matches!(version, MavlinkVersion::V2) {
8902            let len = __tmp.len();
8903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8904        } else {
8905            __tmp.len()
8906        }
8907    }
8908}
8909#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8910#[doc = ""]
8911#[doc = "ID: 336"]
8912#[derive(Debug, Clone, PartialEq)]
8913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8915#[cfg_attr(feature = "ts", derive(TS))]
8916#[cfg_attr(feature = "ts", ts(export))]
8917pub struct CELLULAR_CONFIG_DATA {
8918    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8919    pub enable_lte: u8,
8920    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8921    pub enable_pin: u8,
8922    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8923    #[cfg_attr(feature = "ts", ts(type = "string"))]
8924    pub pin: CharArray<16>,
8925    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8926    #[cfg_attr(feature = "ts", ts(type = "string"))]
8927    pub new_pin: CharArray<16>,
8928    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8929    #[cfg_attr(feature = "ts", ts(type = "string"))]
8930    pub apn: CharArray<32>,
8931    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8932    #[cfg_attr(feature = "ts", ts(type = "string"))]
8933    pub puk: CharArray<16>,
8934    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8935    pub roaming: u8,
8936    #[doc = "Message acceptance response (sent back to GS)."]
8937    pub response: CellularConfigResponse,
8938}
8939impl CELLULAR_CONFIG_DATA {
8940    pub const ENCODED_LEN: usize = 84usize;
8941    pub const DEFAULT: Self = Self {
8942        enable_lte: 0_u8,
8943        enable_pin: 0_u8,
8944        pin: CharArray::new([0_u8; 16usize]),
8945        new_pin: CharArray::new([0_u8; 16usize]),
8946        apn: CharArray::new([0_u8; 32usize]),
8947        puk: CharArray::new([0_u8; 16usize]),
8948        roaming: 0_u8,
8949        response: CellularConfigResponse::DEFAULT,
8950    };
8951    #[cfg(feature = "arbitrary")]
8952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8953        use arbitrary::{Arbitrary, Unstructured};
8954        let mut buf = [0u8; 1024];
8955        rng.fill_bytes(&mut buf);
8956        let mut unstructured = Unstructured::new(&buf);
8957        Self::arbitrary(&mut unstructured).unwrap_or_default()
8958    }
8959}
8960impl Default for CELLULAR_CONFIG_DATA {
8961    fn default() -> Self {
8962        Self::DEFAULT.clone()
8963    }
8964}
8965impl MessageData for CELLULAR_CONFIG_DATA {
8966    type Message = MavMessage;
8967    const ID: u32 = 336u32;
8968    const NAME: &'static str = "CELLULAR_CONFIG";
8969    const EXTRA_CRC: u8 = 245u8;
8970    const ENCODED_LEN: usize = 84usize;
8971    fn deser(
8972        _version: MavlinkVersion,
8973        __input: &[u8],
8974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8975        let avail_len = __input.len();
8976        let mut payload_buf = [0; Self::ENCODED_LEN];
8977        let mut buf = if avail_len < Self::ENCODED_LEN {
8978            payload_buf[0..avail_len].copy_from_slice(__input);
8979            Bytes::new(&payload_buf)
8980        } else {
8981            Bytes::new(__input)
8982        };
8983        let mut __struct = Self::default();
8984        __struct.enable_lte = buf.get_u8();
8985        __struct.enable_pin = buf.get_u8();
8986        let mut tmp = [0_u8; 16usize];
8987        for v in &mut tmp {
8988            *v = buf.get_u8();
8989        }
8990        __struct.pin = CharArray::new(tmp);
8991        let mut tmp = [0_u8; 16usize];
8992        for v in &mut tmp {
8993            *v = buf.get_u8();
8994        }
8995        __struct.new_pin = CharArray::new(tmp);
8996        let mut tmp = [0_u8; 32usize];
8997        for v in &mut tmp {
8998            *v = buf.get_u8();
8999        }
9000        __struct.apn = CharArray::new(tmp);
9001        let mut tmp = [0_u8; 16usize];
9002        for v in &mut tmp {
9003            *v = buf.get_u8();
9004        }
9005        __struct.puk = CharArray::new(tmp);
9006        __struct.roaming = buf.get_u8();
9007        let tmp = buf.get_u8();
9008        __struct.response =
9009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9010                enum_type: "CellularConfigResponse",
9011                value: tmp as u64,
9012            })?;
9013        Ok(__struct)
9014    }
9015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9016        let mut __tmp = BytesMut::new(bytes);
9017        #[allow(clippy::absurd_extreme_comparisons)]
9018        #[allow(unused_comparisons)]
9019        if __tmp.remaining() < Self::ENCODED_LEN {
9020            panic!(
9021                "buffer is too small (need {} bytes, but got {})",
9022                Self::ENCODED_LEN,
9023                __tmp.remaining(),
9024            )
9025        }
9026        __tmp.put_u8(self.enable_lte);
9027        __tmp.put_u8(self.enable_pin);
9028        for val in &self.pin {
9029            __tmp.put_u8(*val);
9030        }
9031        for val in &self.new_pin {
9032            __tmp.put_u8(*val);
9033        }
9034        for val in &self.apn {
9035            __tmp.put_u8(*val);
9036        }
9037        for val in &self.puk {
9038            __tmp.put_u8(*val);
9039        }
9040        __tmp.put_u8(self.roaming);
9041        __tmp.put_u8(self.response as u8);
9042        if matches!(version, MavlinkVersion::V2) {
9043            let len = __tmp.len();
9044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9045        } else {
9046            __tmp.len()
9047        }
9048    }
9049}
9050#[doc = "Report current used cellular network status."]
9051#[doc = ""]
9052#[doc = "ID: 334"]
9053#[derive(Debug, Clone, PartialEq)]
9054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9056#[cfg_attr(feature = "ts", derive(TS))]
9057#[cfg_attr(feature = "ts", ts(export))]
9058pub struct CELLULAR_STATUS_DATA {
9059    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9060    pub mcc: u16,
9061    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9062    pub mnc: u16,
9063    #[doc = "Location area code. If unknown, set to 0"]
9064    pub lac: u16,
9065    #[doc = "Cellular modem status"]
9066    pub status: CellularStatusFlag,
9067    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9068    pub failure_reason: CellularNetworkFailedReason,
9069    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9070    pub mavtype: CellularNetworkRadioType,
9071    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9072    pub quality: u8,
9073}
9074impl CELLULAR_STATUS_DATA {
9075    pub const ENCODED_LEN: usize = 10usize;
9076    pub const DEFAULT: Self = Self {
9077        mcc: 0_u16,
9078        mnc: 0_u16,
9079        lac: 0_u16,
9080        status: CellularStatusFlag::DEFAULT,
9081        failure_reason: CellularNetworkFailedReason::DEFAULT,
9082        mavtype: CellularNetworkRadioType::DEFAULT,
9083        quality: 0_u8,
9084    };
9085    #[cfg(feature = "arbitrary")]
9086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9087        use arbitrary::{Arbitrary, Unstructured};
9088        let mut buf = [0u8; 1024];
9089        rng.fill_bytes(&mut buf);
9090        let mut unstructured = Unstructured::new(&buf);
9091        Self::arbitrary(&mut unstructured).unwrap_or_default()
9092    }
9093}
9094impl Default for CELLULAR_STATUS_DATA {
9095    fn default() -> Self {
9096        Self::DEFAULT.clone()
9097    }
9098}
9099impl MessageData for CELLULAR_STATUS_DATA {
9100    type Message = MavMessage;
9101    const ID: u32 = 334u32;
9102    const NAME: &'static str = "CELLULAR_STATUS";
9103    const EXTRA_CRC: u8 = 72u8;
9104    const ENCODED_LEN: usize = 10usize;
9105    fn deser(
9106        _version: MavlinkVersion,
9107        __input: &[u8],
9108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9109        let avail_len = __input.len();
9110        let mut payload_buf = [0; Self::ENCODED_LEN];
9111        let mut buf = if avail_len < Self::ENCODED_LEN {
9112            payload_buf[0..avail_len].copy_from_slice(__input);
9113            Bytes::new(&payload_buf)
9114        } else {
9115            Bytes::new(__input)
9116        };
9117        let mut __struct = Self::default();
9118        __struct.mcc = buf.get_u16_le();
9119        __struct.mnc = buf.get_u16_le();
9120        __struct.lac = buf.get_u16_le();
9121        let tmp = buf.get_u8();
9122        __struct.status =
9123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9124                enum_type: "CellularStatusFlag",
9125                value: tmp as u64,
9126            })?;
9127        let tmp = buf.get_u8();
9128        __struct.failure_reason =
9129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9130                enum_type: "CellularNetworkFailedReason",
9131                value: tmp as u64,
9132            })?;
9133        let tmp = buf.get_u8();
9134        __struct.mavtype =
9135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9136                enum_type: "CellularNetworkRadioType",
9137                value: tmp as u64,
9138            })?;
9139        __struct.quality = buf.get_u8();
9140        Ok(__struct)
9141    }
9142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9143        let mut __tmp = BytesMut::new(bytes);
9144        #[allow(clippy::absurd_extreme_comparisons)]
9145        #[allow(unused_comparisons)]
9146        if __tmp.remaining() < Self::ENCODED_LEN {
9147            panic!(
9148                "buffer is too small (need {} bytes, but got {})",
9149                Self::ENCODED_LEN,
9150                __tmp.remaining(),
9151            )
9152        }
9153        __tmp.put_u16_le(self.mcc);
9154        __tmp.put_u16_le(self.mnc);
9155        __tmp.put_u16_le(self.lac);
9156        __tmp.put_u8(self.status as u8);
9157        __tmp.put_u8(self.failure_reason as u8);
9158        __tmp.put_u8(self.mavtype as u8);
9159        __tmp.put_u8(self.quality);
9160        if matches!(version, MavlinkVersion::V2) {
9161            let len = __tmp.len();
9162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9163        } else {
9164            __tmp.len()
9165        }
9166    }
9167}
9168#[doc = "Request to control this MAV."]
9169#[doc = ""]
9170#[doc = "ID: 5"]
9171#[derive(Debug, Clone, PartialEq)]
9172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9174#[cfg_attr(feature = "ts", derive(TS))]
9175#[cfg_attr(feature = "ts", ts(export))]
9176pub struct CHANGE_OPERATOR_CONTROL_DATA {
9177    #[doc = "System the GCS requests control for"]
9178    pub target_system: u8,
9179    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9180    pub control_request: u8,
9181    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9182    pub version: u8,
9183    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9184    #[cfg_attr(feature = "ts", ts(type = "string"))]
9185    pub passkey: CharArray<25>,
9186}
9187impl CHANGE_OPERATOR_CONTROL_DATA {
9188    pub const ENCODED_LEN: usize = 28usize;
9189    pub const DEFAULT: Self = Self {
9190        target_system: 0_u8,
9191        control_request: 0_u8,
9192        version: 0_u8,
9193        passkey: CharArray::new([0_u8; 25usize]),
9194    };
9195    #[cfg(feature = "arbitrary")]
9196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9197        use arbitrary::{Arbitrary, Unstructured};
9198        let mut buf = [0u8; 1024];
9199        rng.fill_bytes(&mut buf);
9200        let mut unstructured = Unstructured::new(&buf);
9201        Self::arbitrary(&mut unstructured).unwrap_or_default()
9202    }
9203}
9204impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9205    fn default() -> Self {
9206        Self::DEFAULT.clone()
9207    }
9208}
9209impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9210    type Message = MavMessage;
9211    const ID: u32 = 5u32;
9212    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9213    const EXTRA_CRC: u8 = 217u8;
9214    const ENCODED_LEN: usize = 28usize;
9215    fn deser(
9216        _version: MavlinkVersion,
9217        __input: &[u8],
9218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9219        let avail_len = __input.len();
9220        let mut payload_buf = [0; Self::ENCODED_LEN];
9221        let mut buf = if avail_len < Self::ENCODED_LEN {
9222            payload_buf[0..avail_len].copy_from_slice(__input);
9223            Bytes::new(&payload_buf)
9224        } else {
9225            Bytes::new(__input)
9226        };
9227        let mut __struct = Self::default();
9228        __struct.target_system = buf.get_u8();
9229        __struct.control_request = buf.get_u8();
9230        __struct.version = buf.get_u8();
9231        let mut tmp = [0_u8; 25usize];
9232        for v in &mut tmp {
9233            *v = buf.get_u8();
9234        }
9235        __struct.passkey = CharArray::new(tmp);
9236        Ok(__struct)
9237    }
9238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9239        let mut __tmp = BytesMut::new(bytes);
9240        #[allow(clippy::absurd_extreme_comparisons)]
9241        #[allow(unused_comparisons)]
9242        if __tmp.remaining() < Self::ENCODED_LEN {
9243            panic!(
9244                "buffer is too small (need {} bytes, but got {})",
9245                Self::ENCODED_LEN,
9246                __tmp.remaining(),
9247            )
9248        }
9249        __tmp.put_u8(self.target_system);
9250        __tmp.put_u8(self.control_request);
9251        __tmp.put_u8(self.version);
9252        for val in &self.passkey {
9253            __tmp.put_u8(*val);
9254        }
9255        if matches!(version, MavlinkVersion::V2) {
9256            let len = __tmp.len();
9257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9258        } else {
9259            __tmp.len()
9260        }
9261    }
9262}
9263#[doc = "Accept / deny control of this MAV."]
9264#[doc = ""]
9265#[doc = "ID: 6"]
9266#[derive(Debug, Clone, PartialEq)]
9267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9269#[cfg_attr(feature = "ts", derive(TS))]
9270#[cfg_attr(feature = "ts", ts(export))]
9271pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9272    #[doc = "ID of the GCS this message"]
9273    pub gcs_system_id: u8,
9274    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9275    pub control_request: u8,
9276    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9277    pub ack: u8,
9278}
9279impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9280    pub const ENCODED_LEN: usize = 3usize;
9281    pub const DEFAULT: Self = Self {
9282        gcs_system_id: 0_u8,
9283        control_request: 0_u8,
9284        ack: 0_u8,
9285    };
9286    #[cfg(feature = "arbitrary")]
9287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9288        use arbitrary::{Arbitrary, Unstructured};
9289        let mut buf = [0u8; 1024];
9290        rng.fill_bytes(&mut buf);
9291        let mut unstructured = Unstructured::new(&buf);
9292        Self::arbitrary(&mut unstructured).unwrap_or_default()
9293    }
9294}
9295impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9296    fn default() -> Self {
9297        Self::DEFAULT.clone()
9298    }
9299}
9300impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9301    type Message = MavMessage;
9302    const ID: u32 = 6u32;
9303    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9304    const EXTRA_CRC: u8 = 104u8;
9305    const ENCODED_LEN: usize = 3usize;
9306    fn deser(
9307        _version: MavlinkVersion,
9308        __input: &[u8],
9309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9310        let avail_len = __input.len();
9311        let mut payload_buf = [0; Self::ENCODED_LEN];
9312        let mut buf = if avail_len < Self::ENCODED_LEN {
9313            payload_buf[0..avail_len].copy_from_slice(__input);
9314            Bytes::new(&payload_buf)
9315        } else {
9316            Bytes::new(__input)
9317        };
9318        let mut __struct = Self::default();
9319        __struct.gcs_system_id = buf.get_u8();
9320        __struct.control_request = buf.get_u8();
9321        __struct.ack = buf.get_u8();
9322        Ok(__struct)
9323    }
9324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9325        let mut __tmp = BytesMut::new(bytes);
9326        #[allow(clippy::absurd_extreme_comparisons)]
9327        #[allow(unused_comparisons)]
9328        if __tmp.remaining() < Self::ENCODED_LEN {
9329            panic!(
9330                "buffer is too small (need {} bytes, but got {})",
9331                Self::ENCODED_LEN,
9332                __tmp.remaining(),
9333            )
9334        }
9335        __tmp.put_u8(self.gcs_system_id);
9336        __tmp.put_u8(self.control_request);
9337        __tmp.put_u8(self.ack);
9338        if matches!(version, MavlinkVersion::V2) {
9339            let len = __tmp.len();
9340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9341        } else {
9342            __tmp.len()
9343        }
9344    }
9345}
9346#[doc = "Information about a potential collision."]
9347#[doc = ""]
9348#[doc = "ID: 247"]
9349#[derive(Debug, Clone, PartialEq)]
9350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9352#[cfg_attr(feature = "ts", derive(TS))]
9353#[cfg_attr(feature = "ts", ts(export))]
9354pub struct COLLISION_DATA {
9355    #[doc = "Unique identifier, domain based on src field"]
9356    pub id: u32,
9357    #[doc = "Estimated time until collision occurs"]
9358    pub time_to_minimum_delta: f32,
9359    #[doc = "Closest vertical distance between vehicle and object"]
9360    pub altitude_minimum_delta: f32,
9361    #[doc = "Closest horizontal distance between vehicle and object"]
9362    pub horizontal_minimum_delta: f32,
9363    #[doc = "Collision data source"]
9364    pub src: MavCollisionSrc,
9365    #[doc = "Action that is being taken to avoid this collision"]
9366    pub action: MavCollisionAction,
9367    #[doc = "How concerned the aircraft is about this collision"]
9368    pub threat_level: MavCollisionThreatLevel,
9369}
9370impl COLLISION_DATA {
9371    pub const ENCODED_LEN: usize = 19usize;
9372    pub const DEFAULT: Self = Self {
9373        id: 0_u32,
9374        time_to_minimum_delta: 0.0_f32,
9375        altitude_minimum_delta: 0.0_f32,
9376        horizontal_minimum_delta: 0.0_f32,
9377        src: MavCollisionSrc::DEFAULT,
9378        action: MavCollisionAction::DEFAULT,
9379        threat_level: MavCollisionThreatLevel::DEFAULT,
9380    };
9381    #[cfg(feature = "arbitrary")]
9382    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9383        use arbitrary::{Arbitrary, Unstructured};
9384        let mut buf = [0u8; 1024];
9385        rng.fill_bytes(&mut buf);
9386        let mut unstructured = Unstructured::new(&buf);
9387        Self::arbitrary(&mut unstructured).unwrap_or_default()
9388    }
9389}
9390impl Default for COLLISION_DATA {
9391    fn default() -> Self {
9392        Self::DEFAULT.clone()
9393    }
9394}
9395impl MessageData for COLLISION_DATA {
9396    type Message = MavMessage;
9397    const ID: u32 = 247u32;
9398    const NAME: &'static str = "COLLISION";
9399    const EXTRA_CRC: u8 = 81u8;
9400    const ENCODED_LEN: usize = 19usize;
9401    fn deser(
9402        _version: MavlinkVersion,
9403        __input: &[u8],
9404    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9405        let avail_len = __input.len();
9406        let mut payload_buf = [0; Self::ENCODED_LEN];
9407        let mut buf = if avail_len < Self::ENCODED_LEN {
9408            payload_buf[0..avail_len].copy_from_slice(__input);
9409            Bytes::new(&payload_buf)
9410        } else {
9411            Bytes::new(__input)
9412        };
9413        let mut __struct = Self::default();
9414        __struct.id = buf.get_u32_le();
9415        __struct.time_to_minimum_delta = buf.get_f32_le();
9416        __struct.altitude_minimum_delta = buf.get_f32_le();
9417        __struct.horizontal_minimum_delta = buf.get_f32_le();
9418        let tmp = buf.get_u8();
9419        __struct.src =
9420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9421                enum_type: "MavCollisionSrc",
9422                value: tmp as u64,
9423            })?;
9424        let tmp = buf.get_u8();
9425        __struct.action =
9426            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9427                enum_type: "MavCollisionAction",
9428                value: tmp as u64,
9429            })?;
9430        let tmp = buf.get_u8();
9431        __struct.threat_level =
9432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9433                enum_type: "MavCollisionThreatLevel",
9434                value: tmp as u64,
9435            })?;
9436        Ok(__struct)
9437    }
9438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9439        let mut __tmp = BytesMut::new(bytes);
9440        #[allow(clippy::absurd_extreme_comparisons)]
9441        #[allow(unused_comparisons)]
9442        if __tmp.remaining() < Self::ENCODED_LEN {
9443            panic!(
9444                "buffer is too small (need {} bytes, but got {})",
9445                Self::ENCODED_LEN,
9446                __tmp.remaining(),
9447            )
9448        }
9449        __tmp.put_u32_le(self.id);
9450        __tmp.put_f32_le(self.time_to_minimum_delta);
9451        __tmp.put_f32_le(self.altitude_minimum_delta);
9452        __tmp.put_f32_le(self.horizontal_minimum_delta);
9453        __tmp.put_u8(self.src as u8);
9454        __tmp.put_u8(self.action as u8);
9455        __tmp.put_u8(self.threat_level as u8);
9456        if matches!(version, MavlinkVersion::V2) {
9457            let len = __tmp.len();
9458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9459        } else {
9460            __tmp.len()
9461        }
9462    }
9463}
9464#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9465#[doc = ""]
9466#[doc = "ID: 77"]
9467#[derive(Debug, Clone, PartialEq)]
9468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9470#[cfg_attr(feature = "ts", derive(TS))]
9471#[cfg_attr(feature = "ts", ts(export))]
9472pub struct COMMAND_ACK_DATA {
9473    #[doc = "Command ID (of acknowledged command)."]
9474    pub command: MavCmd,
9475    #[doc = "Result of command."]
9476    pub result: MavResult,
9477    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9479    pub progress: u8,
9480    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9482    pub result_param2: i32,
9483    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9484    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9485    pub target_system: u8,
9486    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9487    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9488    pub target_component: u8,
9489}
9490impl COMMAND_ACK_DATA {
9491    pub const ENCODED_LEN: usize = 10usize;
9492    pub const DEFAULT: Self = Self {
9493        command: MavCmd::DEFAULT,
9494        result: MavResult::DEFAULT,
9495        progress: 0_u8,
9496        result_param2: 0_i32,
9497        target_system: 0_u8,
9498        target_component: 0_u8,
9499    };
9500    #[cfg(feature = "arbitrary")]
9501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9502        use arbitrary::{Arbitrary, Unstructured};
9503        let mut buf = [0u8; 1024];
9504        rng.fill_bytes(&mut buf);
9505        let mut unstructured = Unstructured::new(&buf);
9506        Self::arbitrary(&mut unstructured).unwrap_or_default()
9507    }
9508}
9509impl Default for COMMAND_ACK_DATA {
9510    fn default() -> Self {
9511        Self::DEFAULT.clone()
9512    }
9513}
9514impl MessageData for COMMAND_ACK_DATA {
9515    type Message = MavMessage;
9516    const ID: u32 = 77u32;
9517    const NAME: &'static str = "COMMAND_ACK";
9518    const EXTRA_CRC: u8 = 143u8;
9519    const ENCODED_LEN: usize = 10usize;
9520    fn deser(
9521        _version: MavlinkVersion,
9522        __input: &[u8],
9523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9524        let avail_len = __input.len();
9525        let mut payload_buf = [0; Self::ENCODED_LEN];
9526        let mut buf = if avail_len < Self::ENCODED_LEN {
9527            payload_buf[0..avail_len].copy_from_slice(__input);
9528            Bytes::new(&payload_buf)
9529        } else {
9530            Bytes::new(__input)
9531        };
9532        let mut __struct = Self::default();
9533        let tmp = buf.get_u16_le();
9534        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9535            ::mavlink_core::error::ParserError::InvalidEnum {
9536                enum_type: "MavCmd",
9537                value: tmp as u64,
9538            },
9539        )?;
9540        let tmp = buf.get_u8();
9541        __struct.result =
9542            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9543                enum_type: "MavResult",
9544                value: tmp as u64,
9545            })?;
9546        __struct.progress = buf.get_u8();
9547        __struct.result_param2 = buf.get_i32_le();
9548        __struct.target_system = buf.get_u8();
9549        __struct.target_component = buf.get_u8();
9550        Ok(__struct)
9551    }
9552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9553        let mut __tmp = BytesMut::new(bytes);
9554        #[allow(clippy::absurd_extreme_comparisons)]
9555        #[allow(unused_comparisons)]
9556        if __tmp.remaining() < Self::ENCODED_LEN {
9557            panic!(
9558                "buffer is too small (need {} bytes, but got {})",
9559                Self::ENCODED_LEN,
9560                __tmp.remaining(),
9561            )
9562        }
9563        __tmp.put_u16_le(self.command as u16);
9564        __tmp.put_u8(self.result as u8);
9565        if matches!(version, MavlinkVersion::V2) {
9566            __tmp.put_u8(self.progress);
9567            __tmp.put_i32_le(self.result_param2);
9568            __tmp.put_u8(self.target_system);
9569            __tmp.put_u8(self.target_component);
9570            let len = __tmp.len();
9571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9572        } else {
9573            __tmp.len()
9574        }
9575    }
9576}
9577#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9578#[doc = ""]
9579#[doc = "ID: 80"]
9580#[derive(Debug, Clone, PartialEq)]
9581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9583#[cfg_attr(feature = "ts", derive(TS))]
9584#[cfg_attr(feature = "ts", ts(export))]
9585pub struct COMMAND_CANCEL_DATA {
9586    #[doc = "Command ID (of command to cancel)."]
9587    pub command: MavCmd,
9588    #[doc = "System executing long running command. Should not be broadcast (0)."]
9589    pub target_system: u8,
9590    #[doc = "Component executing long running command."]
9591    pub target_component: u8,
9592}
9593impl COMMAND_CANCEL_DATA {
9594    pub const ENCODED_LEN: usize = 4usize;
9595    pub const DEFAULT: Self = Self {
9596        command: MavCmd::DEFAULT,
9597        target_system: 0_u8,
9598        target_component: 0_u8,
9599    };
9600    #[cfg(feature = "arbitrary")]
9601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9602        use arbitrary::{Arbitrary, Unstructured};
9603        let mut buf = [0u8; 1024];
9604        rng.fill_bytes(&mut buf);
9605        let mut unstructured = Unstructured::new(&buf);
9606        Self::arbitrary(&mut unstructured).unwrap_or_default()
9607    }
9608}
9609impl Default for COMMAND_CANCEL_DATA {
9610    fn default() -> Self {
9611        Self::DEFAULT.clone()
9612    }
9613}
9614impl MessageData for COMMAND_CANCEL_DATA {
9615    type Message = MavMessage;
9616    const ID: u32 = 80u32;
9617    const NAME: &'static str = "COMMAND_CANCEL";
9618    const EXTRA_CRC: u8 = 14u8;
9619    const ENCODED_LEN: usize = 4usize;
9620    fn deser(
9621        _version: MavlinkVersion,
9622        __input: &[u8],
9623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9624        let avail_len = __input.len();
9625        let mut payload_buf = [0; Self::ENCODED_LEN];
9626        let mut buf = if avail_len < Self::ENCODED_LEN {
9627            payload_buf[0..avail_len].copy_from_slice(__input);
9628            Bytes::new(&payload_buf)
9629        } else {
9630            Bytes::new(__input)
9631        };
9632        let mut __struct = Self::default();
9633        let tmp = buf.get_u16_le();
9634        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9635            ::mavlink_core::error::ParserError::InvalidEnum {
9636                enum_type: "MavCmd",
9637                value: tmp as u64,
9638            },
9639        )?;
9640        __struct.target_system = buf.get_u8();
9641        __struct.target_component = buf.get_u8();
9642        Ok(__struct)
9643    }
9644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9645        let mut __tmp = BytesMut::new(bytes);
9646        #[allow(clippy::absurd_extreme_comparisons)]
9647        #[allow(unused_comparisons)]
9648        if __tmp.remaining() < Self::ENCODED_LEN {
9649            panic!(
9650                "buffer is too small (need {} bytes, but got {})",
9651                Self::ENCODED_LEN,
9652                __tmp.remaining(),
9653            )
9654        }
9655        __tmp.put_u16_le(self.command as u16);
9656        __tmp.put_u8(self.target_system);
9657        __tmp.put_u8(self.target_component);
9658        if matches!(version, MavlinkVersion::V2) {
9659            let len = __tmp.len();
9660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9661        } else {
9662            __tmp.len()
9663        }
9664    }
9665}
9666#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9667#[doc = ""]
9668#[doc = "ID: 75"]
9669#[derive(Debug, Clone, PartialEq)]
9670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9672#[cfg_attr(feature = "ts", derive(TS))]
9673#[cfg_attr(feature = "ts", ts(export))]
9674pub struct COMMAND_INT_DATA {
9675    #[doc = "PARAM1, see MAV_CMD enum"]
9676    pub param1: f32,
9677    #[doc = "PARAM2, see MAV_CMD enum"]
9678    pub param2: f32,
9679    #[doc = "PARAM3, see MAV_CMD enum"]
9680    pub param3: f32,
9681    #[doc = "PARAM4, see MAV_CMD enum"]
9682    pub param4: f32,
9683    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9684    pub x: i32,
9685    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9686    pub y: i32,
9687    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9688    pub z: f32,
9689    #[doc = "The scheduled action for the mission item."]
9690    pub command: MavCmd,
9691    #[doc = "System ID"]
9692    pub target_system: u8,
9693    #[doc = "Component ID"]
9694    pub target_component: u8,
9695    #[doc = "The coordinate system of the COMMAND."]
9696    pub frame: MavFrame,
9697    #[doc = "Not used."]
9698    pub current: u8,
9699    #[doc = "Not used (set 0)."]
9700    pub autocontinue: u8,
9701}
9702impl COMMAND_INT_DATA {
9703    pub const ENCODED_LEN: usize = 35usize;
9704    pub const DEFAULT: Self = Self {
9705        param1: 0.0_f32,
9706        param2: 0.0_f32,
9707        param3: 0.0_f32,
9708        param4: 0.0_f32,
9709        x: 0_i32,
9710        y: 0_i32,
9711        z: 0.0_f32,
9712        command: MavCmd::DEFAULT,
9713        target_system: 0_u8,
9714        target_component: 0_u8,
9715        frame: MavFrame::DEFAULT,
9716        current: 0_u8,
9717        autocontinue: 0_u8,
9718    };
9719    #[cfg(feature = "arbitrary")]
9720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9721        use arbitrary::{Arbitrary, Unstructured};
9722        let mut buf = [0u8; 1024];
9723        rng.fill_bytes(&mut buf);
9724        let mut unstructured = Unstructured::new(&buf);
9725        Self::arbitrary(&mut unstructured).unwrap_or_default()
9726    }
9727}
9728impl Default for COMMAND_INT_DATA {
9729    fn default() -> Self {
9730        Self::DEFAULT.clone()
9731    }
9732}
9733impl MessageData for COMMAND_INT_DATA {
9734    type Message = MavMessage;
9735    const ID: u32 = 75u32;
9736    const NAME: &'static str = "COMMAND_INT";
9737    const EXTRA_CRC: u8 = 158u8;
9738    const ENCODED_LEN: usize = 35usize;
9739    fn deser(
9740        _version: MavlinkVersion,
9741        __input: &[u8],
9742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9743        let avail_len = __input.len();
9744        let mut payload_buf = [0; Self::ENCODED_LEN];
9745        let mut buf = if avail_len < Self::ENCODED_LEN {
9746            payload_buf[0..avail_len].copy_from_slice(__input);
9747            Bytes::new(&payload_buf)
9748        } else {
9749            Bytes::new(__input)
9750        };
9751        let mut __struct = Self::default();
9752        __struct.param1 = buf.get_f32_le();
9753        __struct.param2 = buf.get_f32_le();
9754        __struct.param3 = buf.get_f32_le();
9755        __struct.param4 = buf.get_f32_le();
9756        __struct.x = buf.get_i32_le();
9757        __struct.y = buf.get_i32_le();
9758        __struct.z = buf.get_f32_le();
9759        let tmp = buf.get_u16_le();
9760        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9761            ::mavlink_core::error::ParserError::InvalidEnum {
9762                enum_type: "MavCmd",
9763                value: tmp as u64,
9764            },
9765        )?;
9766        __struct.target_system = buf.get_u8();
9767        __struct.target_component = buf.get_u8();
9768        let tmp = buf.get_u8();
9769        __struct.frame =
9770            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9771                enum_type: "MavFrame",
9772                value: tmp as u64,
9773            })?;
9774        __struct.current = buf.get_u8();
9775        __struct.autocontinue = buf.get_u8();
9776        Ok(__struct)
9777    }
9778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9779        let mut __tmp = BytesMut::new(bytes);
9780        #[allow(clippy::absurd_extreme_comparisons)]
9781        #[allow(unused_comparisons)]
9782        if __tmp.remaining() < Self::ENCODED_LEN {
9783            panic!(
9784                "buffer is too small (need {} bytes, but got {})",
9785                Self::ENCODED_LEN,
9786                __tmp.remaining(),
9787            )
9788        }
9789        __tmp.put_f32_le(self.param1);
9790        __tmp.put_f32_le(self.param2);
9791        __tmp.put_f32_le(self.param3);
9792        __tmp.put_f32_le(self.param4);
9793        __tmp.put_i32_le(self.x);
9794        __tmp.put_i32_le(self.y);
9795        __tmp.put_f32_le(self.z);
9796        __tmp.put_u16_le(self.command as u16);
9797        __tmp.put_u8(self.target_system);
9798        __tmp.put_u8(self.target_component);
9799        __tmp.put_u8(self.frame as u8);
9800        __tmp.put_u8(self.current);
9801        __tmp.put_u8(self.autocontinue);
9802        if matches!(version, MavlinkVersion::V2) {
9803            let len = __tmp.len();
9804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9805        } else {
9806            __tmp.len()
9807        }
9808    }
9809}
9810#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
9811#[doc = ""]
9812#[doc = "ID: 223"]
9813#[derive(Debug, Clone, PartialEq)]
9814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9816#[cfg_attr(feature = "ts", derive(TS))]
9817#[cfg_attr(feature = "ts", ts(export))]
9818pub struct COMMAND_INT_STAMPED_DATA {
9819    #[doc = "Microseconds elapsed since vehicle boot"]
9820    pub vehicle_timestamp: u64,
9821    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9822    pub utc_time: u32,
9823    #[doc = "PARAM1, see MAV_CMD enum"]
9824    pub param1: f32,
9825    #[doc = "PARAM2, see MAV_CMD enum"]
9826    pub param2: f32,
9827    #[doc = "PARAM3, see MAV_CMD enum"]
9828    pub param3: f32,
9829    #[doc = "PARAM4, see MAV_CMD enum"]
9830    pub param4: f32,
9831    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9832    pub x: i32,
9833    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9834    pub y: i32,
9835    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
9836    pub z: f32,
9837    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
9838    pub command: MavCmd,
9839    #[doc = "System ID"]
9840    pub target_system: u8,
9841    #[doc = "Component ID"]
9842    pub target_component: u8,
9843    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
9844    pub frame: MavFrame,
9845    #[doc = "false:0, true:1"]
9846    pub current: u8,
9847    #[doc = "autocontinue to next wp"]
9848    pub autocontinue: u8,
9849}
9850impl COMMAND_INT_STAMPED_DATA {
9851    pub const ENCODED_LEN: usize = 47usize;
9852    pub const DEFAULT: Self = Self {
9853        vehicle_timestamp: 0_u64,
9854        utc_time: 0_u32,
9855        param1: 0.0_f32,
9856        param2: 0.0_f32,
9857        param3: 0.0_f32,
9858        param4: 0.0_f32,
9859        x: 0_i32,
9860        y: 0_i32,
9861        z: 0.0_f32,
9862        command: MavCmd::DEFAULT,
9863        target_system: 0_u8,
9864        target_component: 0_u8,
9865        frame: MavFrame::DEFAULT,
9866        current: 0_u8,
9867        autocontinue: 0_u8,
9868    };
9869    #[cfg(feature = "arbitrary")]
9870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9871        use arbitrary::{Arbitrary, Unstructured};
9872        let mut buf = [0u8; 1024];
9873        rng.fill_bytes(&mut buf);
9874        let mut unstructured = Unstructured::new(&buf);
9875        Self::arbitrary(&mut unstructured).unwrap_or_default()
9876    }
9877}
9878impl Default for COMMAND_INT_STAMPED_DATA {
9879    fn default() -> Self {
9880        Self::DEFAULT.clone()
9881    }
9882}
9883impl MessageData for COMMAND_INT_STAMPED_DATA {
9884    type Message = MavMessage;
9885    const ID: u32 = 223u32;
9886    const NAME: &'static str = "COMMAND_INT_STAMPED";
9887    const EXTRA_CRC: u8 = 119u8;
9888    const ENCODED_LEN: usize = 47usize;
9889    fn deser(
9890        _version: MavlinkVersion,
9891        __input: &[u8],
9892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9893        let avail_len = __input.len();
9894        let mut payload_buf = [0; Self::ENCODED_LEN];
9895        let mut buf = if avail_len < Self::ENCODED_LEN {
9896            payload_buf[0..avail_len].copy_from_slice(__input);
9897            Bytes::new(&payload_buf)
9898        } else {
9899            Bytes::new(__input)
9900        };
9901        let mut __struct = Self::default();
9902        __struct.vehicle_timestamp = buf.get_u64_le();
9903        __struct.utc_time = buf.get_u32_le();
9904        __struct.param1 = buf.get_f32_le();
9905        __struct.param2 = buf.get_f32_le();
9906        __struct.param3 = buf.get_f32_le();
9907        __struct.param4 = buf.get_f32_le();
9908        __struct.x = buf.get_i32_le();
9909        __struct.y = buf.get_i32_le();
9910        __struct.z = buf.get_f32_le();
9911        let tmp = buf.get_u16_le();
9912        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9913            ::mavlink_core::error::ParserError::InvalidEnum {
9914                enum_type: "MavCmd",
9915                value: tmp as u64,
9916            },
9917        )?;
9918        __struct.target_system = buf.get_u8();
9919        __struct.target_component = buf.get_u8();
9920        let tmp = buf.get_u8();
9921        __struct.frame =
9922            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9923                enum_type: "MavFrame",
9924                value: tmp as u64,
9925            })?;
9926        __struct.current = buf.get_u8();
9927        __struct.autocontinue = buf.get_u8();
9928        Ok(__struct)
9929    }
9930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9931        let mut __tmp = BytesMut::new(bytes);
9932        #[allow(clippy::absurd_extreme_comparisons)]
9933        #[allow(unused_comparisons)]
9934        if __tmp.remaining() < Self::ENCODED_LEN {
9935            panic!(
9936                "buffer is too small (need {} bytes, but got {})",
9937                Self::ENCODED_LEN,
9938                __tmp.remaining(),
9939            )
9940        }
9941        __tmp.put_u64_le(self.vehicle_timestamp);
9942        __tmp.put_u32_le(self.utc_time);
9943        __tmp.put_f32_le(self.param1);
9944        __tmp.put_f32_le(self.param2);
9945        __tmp.put_f32_le(self.param3);
9946        __tmp.put_f32_le(self.param4);
9947        __tmp.put_i32_le(self.x);
9948        __tmp.put_i32_le(self.y);
9949        __tmp.put_f32_le(self.z);
9950        __tmp.put_u16_le(self.command as u16);
9951        __tmp.put_u8(self.target_system);
9952        __tmp.put_u8(self.target_component);
9953        __tmp.put_u8(self.frame as u8);
9954        __tmp.put_u8(self.current);
9955        __tmp.put_u8(self.autocontinue);
9956        if matches!(version, MavlinkVersion::V2) {
9957            let len = __tmp.len();
9958            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9959        } else {
9960            __tmp.len()
9961        }
9962    }
9963}
9964#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9965#[doc = ""]
9966#[doc = "ID: 76"]
9967#[derive(Debug, Clone, PartialEq)]
9968#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9969#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9970#[cfg_attr(feature = "ts", derive(TS))]
9971#[cfg_attr(feature = "ts", ts(export))]
9972pub struct COMMAND_LONG_DATA {
9973    #[doc = "Parameter 1 (for the specific command)."]
9974    pub param1: f32,
9975    #[doc = "Parameter 2 (for the specific command)."]
9976    pub param2: f32,
9977    #[doc = "Parameter 3 (for the specific command)."]
9978    pub param3: f32,
9979    #[doc = "Parameter 4 (for the specific command)."]
9980    pub param4: f32,
9981    #[doc = "Parameter 5 (for the specific command)."]
9982    pub param5: f32,
9983    #[doc = "Parameter 6 (for the specific command)."]
9984    pub param6: f32,
9985    #[doc = "Parameter 7 (for the specific command)."]
9986    pub param7: f32,
9987    #[doc = "Command ID (of command to send)."]
9988    pub command: MavCmd,
9989    #[doc = "System which should execute the command"]
9990    pub target_system: u8,
9991    #[doc = "Component which should execute the command, 0 for all components"]
9992    pub target_component: u8,
9993    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9994    pub confirmation: u8,
9995}
9996impl COMMAND_LONG_DATA {
9997    pub const ENCODED_LEN: usize = 33usize;
9998    pub const DEFAULT: Self = Self {
9999        param1: 0.0_f32,
10000        param2: 0.0_f32,
10001        param3: 0.0_f32,
10002        param4: 0.0_f32,
10003        param5: 0.0_f32,
10004        param6: 0.0_f32,
10005        param7: 0.0_f32,
10006        command: MavCmd::DEFAULT,
10007        target_system: 0_u8,
10008        target_component: 0_u8,
10009        confirmation: 0_u8,
10010    };
10011    #[cfg(feature = "arbitrary")]
10012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10013        use arbitrary::{Arbitrary, Unstructured};
10014        let mut buf = [0u8; 1024];
10015        rng.fill_bytes(&mut buf);
10016        let mut unstructured = Unstructured::new(&buf);
10017        Self::arbitrary(&mut unstructured).unwrap_or_default()
10018    }
10019}
10020impl Default for COMMAND_LONG_DATA {
10021    fn default() -> Self {
10022        Self::DEFAULT.clone()
10023    }
10024}
10025impl MessageData for COMMAND_LONG_DATA {
10026    type Message = MavMessage;
10027    const ID: u32 = 76u32;
10028    const NAME: &'static str = "COMMAND_LONG";
10029    const EXTRA_CRC: u8 = 152u8;
10030    const ENCODED_LEN: usize = 33usize;
10031    fn deser(
10032        _version: MavlinkVersion,
10033        __input: &[u8],
10034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10035        let avail_len = __input.len();
10036        let mut payload_buf = [0; Self::ENCODED_LEN];
10037        let mut buf = if avail_len < Self::ENCODED_LEN {
10038            payload_buf[0..avail_len].copy_from_slice(__input);
10039            Bytes::new(&payload_buf)
10040        } else {
10041            Bytes::new(__input)
10042        };
10043        let mut __struct = Self::default();
10044        __struct.param1 = buf.get_f32_le();
10045        __struct.param2 = buf.get_f32_le();
10046        __struct.param3 = buf.get_f32_le();
10047        __struct.param4 = buf.get_f32_le();
10048        __struct.param5 = buf.get_f32_le();
10049        __struct.param6 = buf.get_f32_le();
10050        __struct.param7 = buf.get_f32_le();
10051        let tmp = buf.get_u16_le();
10052        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10053            ::mavlink_core::error::ParserError::InvalidEnum {
10054                enum_type: "MavCmd",
10055                value: tmp as u64,
10056            },
10057        )?;
10058        __struct.target_system = buf.get_u8();
10059        __struct.target_component = buf.get_u8();
10060        __struct.confirmation = buf.get_u8();
10061        Ok(__struct)
10062    }
10063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10064        let mut __tmp = BytesMut::new(bytes);
10065        #[allow(clippy::absurd_extreme_comparisons)]
10066        #[allow(unused_comparisons)]
10067        if __tmp.remaining() < Self::ENCODED_LEN {
10068            panic!(
10069                "buffer is too small (need {} bytes, but got {})",
10070                Self::ENCODED_LEN,
10071                __tmp.remaining(),
10072            )
10073        }
10074        __tmp.put_f32_le(self.param1);
10075        __tmp.put_f32_le(self.param2);
10076        __tmp.put_f32_le(self.param3);
10077        __tmp.put_f32_le(self.param4);
10078        __tmp.put_f32_le(self.param5);
10079        __tmp.put_f32_le(self.param6);
10080        __tmp.put_f32_le(self.param7);
10081        __tmp.put_u16_le(self.command as u16);
10082        __tmp.put_u8(self.target_system);
10083        __tmp.put_u8(self.target_component);
10084        __tmp.put_u8(self.confirmation);
10085        if matches!(version, MavlinkVersion::V2) {
10086            let len = __tmp.len();
10087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10088        } else {
10089            __tmp.len()
10090        }
10091    }
10092}
10093#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
10094#[doc = ""]
10095#[doc = "ID: 224"]
10096#[derive(Debug, Clone, PartialEq)]
10097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10099#[cfg_attr(feature = "ts", derive(TS))]
10100#[cfg_attr(feature = "ts", ts(export))]
10101pub struct COMMAND_LONG_STAMPED_DATA {
10102    #[doc = "Microseconds elapsed since vehicle boot"]
10103    pub vehicle_timestamp: u64,
10104    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
10105    pub utc_time: u32,
10106    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
10107    pub param1: f32,
10108    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
10109    pub param2: f32,
10110    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
10111    pub param3: f32,
10112    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
10113    pub param4: f32,
10114    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
10115    pub param5: f32,
10116    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
10117    pub param6: f32,
10118    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
10119    pub param7: f32,
10120    #[doc = "Command ID, as defined by MAV_CMD enum."]
10121    pub command: MavCmd,
10122    #[doc = "System which should execute the command"]
10123    pub target_system: u8,
10124    #[doc = "Component which should execute the command, 0 for all components"]
10125    pub target_component: u8,
10126    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
10127    pub confirmation: u8,
10128}
10129impl COMMAND_LONG_STAMPED_DATA {
10130    pub const ENCODED_LEN: usize = 45usize;
10131    pub const DEFAULT: Self = Self {
10132        vehicle_timestamp: 0_u64,
10133        utc_time: 0_u32,
10134        param1: 0.0_f32,
10135        param2: 0.0_f32,
10136        param3: 0.0_f32,
10137        param4: 0.0_f32,
10138        param5: 0.0_f32,
10139        param6: 0.0_f32,
10140        param7: 0.0_f32,
10141        command: MavCmd::DEFAULT,
10142        target_system: 0_u8,
10143        target_component: 0_u8,
10144        confirmation: 0_u8,
10145    };
10146    #[cfg(feature = "arbitrary")]
10147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10148        use arbitrary::{Arbitrary, Unstructured};
10149        let mut buf = [0u8; 1024];
10150        rng.fill_bytes(&mut buf);
10151        let mut unstructured = Unstructured::new(&buf);
10152        Self::arbitrary(&mut unstructured).unwrap_or_default()
10153    }
10154}
10155impl Default for COMMAND_LONG_STAMPED_DATA {
10156    fn default() -> Self {
10157        Self::DEFAULT.clone()
10158    }
10159}
10160impl MessageData for COMMAND_LONG_STAMPED_DATA {
10161    type Message = MavMessage;
10162    const ID: u32 = 224u32;
10163    const NAME: &'static str = "COMMAND_LONG_STAMPED";
10164    const EXTRA_CRC: u8 = 102u8;
10165    const ENCODED_LEN: usize = 45usize;
10166    fn deser(
10167        _version: MavlinkVersion,
10168        __input: &[u8],
10169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10170        let avail_len = __input.len();
10171        let mut payload_buf = [0; Self::ENCODED_LEN];
10172        let mut buf = if avail_len < Self::ENCODED_LEN {
10173            payload_buf[0..avail_len].copy_from_slice(__input);
10174            Bytes::new(&payload_buf)
10175        } else {
10176            Bytes::new(__input)
10177        };
10178        let mut __struct = Self::default();
10179        __struct.vehicle_timestamp = buf.get_u64_le();
10180        __struct.utc_time = buf.get_u32_le();
10181        __struct.param1 = buf.get_f32_le();
10182        __struct.param2 = buf.get_f32_le();
10183        __struct.param3 = buf.get_f32_le();
10184        __struct.param4 = buf.get_f32_le();
10185        __struct.param5 = buf.get_f32_le();
10186        __struct.param6 = buf.get_f32_le();
10187        __struct.param7 = buf.get_f32_le();
10188        let tmp = buf.get_u16_le();
10189        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10190            ::mavlink_core::error::ParserError::InvalidEnum {
10191                enum_type: "MavCmd",
10192                value: tmp as u64,
10193            },
10194        )?;
10195        __struct.target_system = buf.get_u8();
10196        __struct.target_component = buf.get_u8();
10197        __struct.confirmation = buf.get_u8();
10198        Ok(__struct)
10199    }
10200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10201        let mut __tmp = BytesMut::new(bytes);
10202        #[allow(clippy::absurd_extreme_comparisons)]
10203        #[allow(unused_comparisons)]
10204        if __tmp.remaining() < Self::ENCODED_LEN {
10205            panic!(
10206                "buffer is too small (need {} bytes, but got {})",
10207                Self::ENCODED_LEN,
10208                __tmp.remaining(),
10209            )
10210        }
10211        __tmp.put_u64_le(self.vehicle_timestamp);
10212        __tmp.put_u32_le(self.utc_time);
10213        __tmp.put_f32_le(self.param1);
10214        __tmp.put_f32_le(self.param2);
10215        __tmp.put_f32_le(self.param3);
10216        __tmp.put_f32_le(self.param4);
10217        __tmp.put_f32_le(self.param5);
10218        __tmp.put_f32_le(self.param6);
10219        __tmp.put_f32_le(self.param7);
10220        __tmp.put_u16_le(self.command as u16);
10221        __tmp.put_u8(self.target_system);
10222        __tmp.put_u8(self.target_component);
10223        __tmp.put_u8(self.confirmation);
10224        if matches!(version, MavlinkVersion::V2) {
10225            let len = __tmp.len();
10226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10227        } else {
10228            __tmp.len()
10229        }
10230    }
10231}
10232#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
10233#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
10234#[doc = ""]
10235#[doc = "ID: 395"]
10236#[derive(Debug, Clone, PartialEq)]
10237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10239#[cfg_attr(feature = "ts", derive(TS))]
10240#[cfg_attr(feature = "ts", ts(export))]
10241pub struct COMPONENT_INFORMATION_DATA {
10242    #[doc = "Timestamp (time since system boot)."]
10243    pub time_boot_ms: u32,
10244    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
10245    pub general_metadata_file_crc: u32,
10246    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
10247    pub peripherals_metadata_file_crc: u32,
10248    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10249    #[cfg_attr(feature = "ts", ts(type = "string"))]
10250    pub general_metadata_uri: CharArray<100>,
10251    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
10252    #[cfg_attr(feature = "ts", ts(type = "string"))]
10253    pub peripherals_metadata_uri: CharArray<100>,
10254}
10255impl COMPONENT_INFORMATION_DATA {
10256    pub const ENCODED_LEN: usize = 212usize;
10257    pub const DEFAULT: Self = Self {
10258        time_boot_ms: 0_u32,
10259        general_metadata_file_crc: 0_u32,
10260        peripherals_metadata_file_crc: 0_u32,
10261        general_metadata_uri: CharArray::new([0_u8; 100usize]),
10262        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
10263    };
10264    #[cfg(feature = "arbitrary")]
10265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10266        use arbitrary::{Arbitrary, Unstructured};
10267        let mut buf = [0u8; 1024];
10268        rng.fill_bytes(&mut buf);
10269        let mut unstructured = Unstructured::new(&buf);
10270        Self::arbitrary(&mut unstructured).unwrap_or_default()
10271    }
10272}
10273impl Default for COMPONENT_INFORMATION_DATA {
10274    fn default() -> Self {
10275        Self::DEFAULT.clone()
10276    }
10277}
10278impl MessageData for COMPONENT_INFORMATION_DATA {
10279    type Message = MavMessage;
10280    const ID: u32 = 395u32;
10281    const NAME: &'static str = "COMPONENT_INFORMATION";
10282    const EXTRA_CRC: u8 = 0u8;
10283    const ENCODED_LEN: usize = 212usize;
10284    fn deser(
10285        _version: MavlinkVersion,
10286        __input: &[u8],
10287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10288        let avail_len = __input.len();
10289        let mut payload_buf = [0; Self::ENCODED_LEN];
10290        let mut buf = if avail_len < Self::ENCODED_LEN {
10291            payload_buf[0..avail_len].copy_from_slice(__input);
10292            Bytes::new(&payload_buf)
10293        } else {
10294            Bytes::new(__input)
10295        };
10296        let mut __struct = Self::default();
10297        __struct.time_boot_ms = buf.get_u32_le();
10298        __struct.general_metadata_file_crc = buf.get_u32_le();
10299        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
10300        let mut tmp = [0_u8; 100usize];
10301        for v in &mut tmp {
10302            *v = buf.get_u8();
10303        }
10304        __struct.general_metadata_uri = CharArray::new(tmp);
10305        let mut tmp = [0_u8; 100usize];
10306        for v in &mut tmp {
10307            *v = buf.get_u8();
10308        }
10309        __struct.peripherals_metadata_uri = CharArray::new(tmp);
10310        Ok(__struct)
10311    }
10312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10313        let mut __tmp = BytesMut::new(bytes);
10314        #[allow(clippy::absurd_extreme_comparisons)]
10315        #[allow(unused_comparisons)]
10316        if __tmp.remaining() < Self::ENCODED_LEN {
10317            panic!(
10318                "buffer is too small (need {} bytes, but got {})",
10319                Self::ENCODED_LEN,
10320                __tmp.remaining(),
10321            )
10322        }
10323        __tmp.put_u32_le(self.time_boot_ms);
10324        __tmp.put_u32_le(self.general_metadata_file_crc);
10325        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
10326        for val in &self.general_metadata_uri {
10327            __tmp.put_u8(*val);
10328        }
10329        for val in &self.peripherals_metadata_uri {
10330            __tmp.put_u8(*val);
10331        }
10332        if matches!(version, MavlinkVersion::V2) {
10333            let len = __tmp.len();
10334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10335        } else {
10336            __tmp.len()
10337        }
10338    }
10339}
10340#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10341#[doc = ""]
10342#[doc = "ID: 396"]
10343#[derive(Debug, Clone, PartialEq)]
10344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10346#[cfg_attr(feature = "ts", derive(TS))]
10347#[cfg_attr(feature = "ts", ts(export))]
10348pub struct COMPONENT_INFORMATION_BASIC_DATA {
10349    #[doc = "Component capability flags"]
10350    pub capabilities: MavProtocolCapability,
10351    #[doc = "Timestamp (time since system boot)."]
10352    pub time_boot_ms: u32,
10353    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10354    pub time_manufacture_s: u32,
10355    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10356    #[cfg_attr(feature = "ts", ts(type = "string"))]
10357    pub vendor_name: CharArray<32>,
10358    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10359    #[cfg_attr(feature = "ts", ts(type = "string"))]
10360    pub model_name: CharArray<32>,
10361    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10362    #[cfg_attr(feature = "ts", ts(type = "string"))]
10363    pub software_version: CharArray<24>,
10364    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10365    #[cfg_attr(feature = "ts", ts(type = "string"))]
10366    pub hardware_version: CharArray<24>,
10367    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10368    #[cfg_attr(feature = "ts", ts(type = "string"))]
10369    pub serial_number: CharArray<32>,
10370}
10371impl COMPONENT_INFORMATION_BASIC_DATA {
10372    pub const ENCODED_LEN: usize = 160usize;
10373    pub const DEFAULT: Self = Self {
10374        capabilities: MavProtocolCapability::DEFAULT,
10375        time_boot_ms: 0_u32,
10376        time_manufacture_s: 0_u32,
10377        vendor_name: CharArray::new([0_u8; 32usize]),
10378        model_name: CharArray::new([0_u8; 32usize]),
10379        software_version: CharArray::new([0_u8; 24usize]),
10380        hardware_version: CharArray::new([0_u8; 24usize]),
10381        serial_number: CharArray::new([0_u8; 32usize]),
10382    };
10383    #[cfg(feature = "arbitrary")]
10384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10385        use arbitrary::{Arbitrary, Unstructured};
10386        let mut buf = [0u8; 1024];
10387        rng.fill_bytes(&mut buf);
10388        let mut unstructured = Unstructured::new(&buf);
10389        Self::arbitrary(&mut unstructured).unwrap_or_default()
10390    }
10391}
10392impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10393    fn default() -> Self {
10394        Self::DEFAULT.clone()
10395    }
10396}
10397impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10398    type Message = MavMessage;
10399    const ID: u32 = 396u32;
10400    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10401    const EXTRA_CRC: u8 = 50u8;
10402    const ENCODED_LEN: usize = 160usize;
10403    fn deser(
10404        _version: MavlinkVersion,
10405        __input: &[u8],
10406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10407        let avail_len = __input.len();
10408        let mut payload_buf = [0; Self::ENCODED_LEN];
10409        let mut buf = if avail_len < Self::ENCODED_LEN {
10410            payload_buf[0..avail_len].copy_from_slice(__input);
10411            Bytes::new(&payload_buf)
10412        } else {
10413            Bytes::new(__input)
10414        };
10415        let mut __struct = Self::default();
10416        let tmp = buf.get_u64_le();
10417        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
10418            ::mavlink_core::error::ParserError::InvalidFlag {
10419                flag_type: "MavProtocolCapability",
10420                value: tmp as u64,
10421            },
10422        )?;
10423        __struct.time_boot_ms = buf.get_u32_le();
10424        __struct.time_manufacture_s = buf.get_u32_le();
10425        let mut tmp = [0_u8; 32usize];
10426        for v in &mut tmp {
10427            *v = buf.get_u8();
10428        }
10429        __struct.vendor_name = CharArray::new(tmp);
10430        let mut tmp = [0_u8; 32usize];
10431        for v in &mut tmp {
10432            *v = buf.get_u8();
10433        }
10434        __struct.model_name = CharArray::new(tmp);
10435        let mut tmp = [0_u8; 24usize];
10436        for v in &mut tmp {
10437            *v = buf.get_u8();
10438        }
10439        __struct.software_version = CharArray::new(tmp);
10440        let mut tmp = [0_u8; 24usize];
10441        for v in &mut tmp {
10442            *v = buf.get_u8();
10443        }
10444        __struct.hardware_version = CharArray::new(tmp);
10445        let mut tmp = [0_u8; 32usize];
10446        for v in &mut tmp {
10447            *v = buf.get_u8();
10448        }
10449        __struct.serial_number = CharArray::new(tmp);
10450        Ok(__struct)
10451    }
10452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10453        let mut __tmp = BytesMut::new(bytes);
10454        #[allow(clippy::absurd_extreme_comparisons)]
10455        #[allow(unused_comparisons)]
10456        if __tmp.remaining() < Self::ENCODED_LEN {
10457            panic!(
10458                "buffer is too small (need {} bytes, but got {})",
10459                Self::ENCODED_LEN,
10460                __tmp.remaining(),
10461            )
10462        }
10463        __tmp.put_u64_le(self.capabilities.bits());
10464        __tmp.put_u32_le(self.time_boot_ms);
10465        __tmp.put_u32_le(self.time_manufacture_s);
10466        for val in &self.vendor_name {
10467            __tmp.put_u8(*val);
10468        }
10469        for val in &self.model_name {
10470            __tmp.put_u8(*val);
10471        }
10472        for val in &self.software_version {
10473            __tmp.put_u8(*val);
10474        }
10475        for val in &self.hardware_version {
10476            __tmp.put_u8(*val);
10477        }
10478        for val in &self.serial_number {
10479            __tmp.put_u8(*val);
10480        }
10481        if matches!(version, MavlinkVersion::V2) {
10482            let len = __tmp.len();
10483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10484        } else {
10485            __tmp.len()
10486        }
10487    }
10488}
10489#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10490#[doc = ""]
10491#[doc = "ID: 397"]
10492#[derive(Debug, Clone, PartialEq)]
10493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10495#[cfg_attr(feature = "ts", derive(TS))]
10496#[cfg_attr(feature = "ts", ts(export))]
10497pub struct COMPONENT_METADATA_DATA {
10498    #[doc = "Timestamp (time since system boot)."]
10499    pub time_boot_ms: u32,
10500    #[doc = "CRC32 of the general metadata file."]
10501    pub file_crc: u32,
10502    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10503    #[cfg_attr(feature = "ts", ts(type = "string"))]
10504    pub uri: CharArray<100>,
10505}
10506impl COMPONENT_METADATA_DATA {
10507    pub const ENCODED_LEN: usize = 108usize;
10508    pub const DEFAULT: Self = Self {
10509        time_boot_ms: 0_u32,
10510        file_crc: 0_u32,
10511        uri: CharArray::new([0_u8; 100usize]),
10512    };
10513    #[cfg(feature = "arbitrary")]
10514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10515        use arbitrary::{Arbitrary, Unstructured};
10516        let mut buf = [0u8; 1024];
10517        rng.fill_bytes(&mut buf);
10518        let mut unstructured = Unstructured::new(&buf);
10519        Self::arbitrary(&mut unstructured).unwrap_or_default()
10520    }
10521}
10522impl Default for COMPONENT_METADATA_DATA {
10523    fn default() -> Self {
10524        Self::DEFAULT.clone()
10525    }
10526}
10527impl MessageData for COMPONENT_METADATA_DATA {
10528    type Message = MavMessage;
10529    const ID: u32 = 397u32;
10530    const NAME: &'static str = "COMPONENT_METADATA";
10531    const EXTRA_CRC: u8 = 182u8;
10532    const ENCODED_LEN: usize = 108usize;
10533    fn deser(
10534        _version: MavlinkVersion,
10535        __input: &[u8],
10536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10537        let avail_len = __input.len();
10538        let mut payload_buf = [0; Self::ENCODED_LEN];
10539        let mut buf = if avail_len < Self::ENCODED_LEN {
10540            payload_buf[0..avail_len].copy_from_slice(__input);
10541            Bytes::new(&payload_buf)
10542        } else {
10543            Bytes::new(__input)
10544        };
10545        let mut __struct = Self::default();
10546        __struct.time_boot_ms = buf.get_u32_le();
10547        __struct.file_crc = buf.get_u32_le();
10548        let mut tmp = [0_u8; 100usize];
10549        for v in &mut tmp {
10550            *v = buf.get_u8();
10551        }
10552        __struct.uri = CharArray::new(tmp);
10553        Ok(__struct)
10554    }
10555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10556        let mut __tmp = BytesMut::new(bytes);
10557        #[allow(clippy::absurd_extreme_comparisons)]
10558        #[allow(unused_comparisons)]
10559        if __tmp.remaining() < Self::ENCODED_LEN {
10560            panic!(
10561                "buffer is too small (need {} bytes, but got {})",
10562                Self::ENCODED_LEN,
10563                __tmp.remaining(),
10564            )
10565        }
10566        __tmp.put_u32_le(self.time_boot_ms);
10567        __tmp.put_u32_le(self.file_crc);
10568        for val in &self.uri {
10569            __tmp.put_u8(*val);
10570        }
10571        if matches!(version, MavlinkVersion::V2) {
10572            let len = __tmp.len();
10573            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10574        } else {
10575            __tmp.len()
10576        }
10577    }
10578}
10579#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10580#[doc = ""]
10581#[doc = "ID: 146"]
10582#[derive(Debug, Clone, PartialEq)]
10583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10585#[cfg_attr(feature = "ts", derive(TS))]
10586#[cfg_attr(feature = "ts", ts(export))]
10587pub struct CONTROL_SYSTEM_STATE_DATA {
10588    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10589    pub time_usec: u64,
10590    #[doc = "X acceleration in body frame"]
10591    pub x_acc: f32,
10592    #[doc = "Y acceleration in body frame"]
10593    pub y_acc: f32,
10594    #[doc = "Z acceleration in body frame"]
10595    pub z_acc: f32,
10596    #[doc = "X velocity in body frame"]
10597    pub x_vel: f32,
10598    #[doc = "Y velocity in body frame"]
10599    pub y_vel: f32,
10600    #[doc = "Z velocity in body frame"]
10601    pub z_vel: f32,
10602    #[doc = "X position in local frame"]
10603    pub x_pos: f32,
10604    #[doc = "Y position in local frame"]
10605    pub y_pos: f32,
10606    #[doc = "Z position in local frame"]
10607    pub z_pos: f32,
10608    #[doc = "Airspeed, set to -1 if unknown"]
10609    pub airspeed: f32,
10610    #[doc = "Variance of body velocity estimate"]
10611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10613    pub vel_variance: [f32; 3],
10614    #[doc = "Variance in local position"]
10615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10617    pub pos_variance: [f32; 3],
10618    #[doc = "The attitude, represented as Quaternion"]
10619    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10620    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10621    pub q: [f32; 4],
10622    #[doc = "Angular rate in roll axis"]
10623    pub roll_rate: f32,
10624    #[doc = "Angular rate in pitch axis"]
10625    pub pitch_rate: f32,
10626    #[doc = "Angular rate in yaw axis"]
10627    pub yaw_rate: f32,
10628}
10629impl CONTROL_SYSTEM_STATE_DATA {
10630    pub const ENCODED_LEN: usize = 100usize;
10631    pub const DEFAULT: Self = Self {
10632        time_usec: 0_u64,
10633        x_acc: 0.0_f32,
10634        y_acc: 0.0_f32,
10635        z_acc: 0.0_f32,
10636        x_vel: 0.0_f32,
10637        y_vel: 0.0_f32,
10638        z_vel: 0.0_f32,
10639        x_pos: 0.0_f32,
10640        y_pos: 0.0_f32,
10641        z_pos: 0.0_f32,
10642        airspeed: 0.0_f32,
10643        vel_variance: [0.0_f32; 3usize],
10644        pos_variance: [0.0_f32; 3usize],
10645        q: [0.0_f32; 4usize],
10646        roll_rate: 0.0_f32,
10647        pitch_rate: 0.0_f32,
10648        yaw_rate: 0.0_f32,
10649    };
10650    #[cfg(feature = "arbitrary")]
10651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10652        use arbitrary::{Arbitrary, Unstructured};
10653        let mut buf = [0u8; 1024];
10654        rng.fill_bytes(&mut buf);
10655        let mut unstructured = Unstructured::new(&buf);
10656        Self::arbitrary(&mut unstructured).unwrap_or_default()
10657    }
10658}
10659impl Default for CONTROL_SYSTEM_STATE_DATA {
10660    fn default() -> Self {
10661        Self::DEFAULT.clone()
10662    }
10663}
10664impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10665    type Message = MavMessage;
10666    const ID: u32 = 146u32;
10667    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10668    const EXTRA_CRC: u8 = 103u8;
10669    const ENCODED_LEN: usize = 100usize;
10670    fn deser(
10671        _version: MavlinkVersion,
10672        __input: &[u8],
10673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10674        let avail_len = __input.len();
10675        let mut payload_buf = [0; Self::ENCODED_LEN];
10676        let mut buf = if avail_len < Self::ENCODED_LEN {
10677            payload_buf[0..avail_len].copy_from_slice(__input);
10678            Bytes::new(&payload_buf)
10679        } else {
10680            Bytes::new(__input)
10681        };
10682        let mut __struct = Self::default();
10683        __struct.time_usec = buf.get_u64_le();
10684        __struct.x_acc = buf.get_f32_le();
10685        __struct.y_acc = buf.get_f32_le();
10686        __struct.z_acc = buf.get_f32_le();
10687        __struct.x_vel = buf.get_f32_le();
10688        __struct.y_vel = buf.get_f32_le();
10689        __struct.z_vel = buf.get_f32_le();
10690        __struct.x_pos = buf.get_f32_le();
10691        __struct.y_pos = buf.get_f32_le();
10692        __struct.z_pos = buf.get_f32_le();
10693        __struct.airspeed = buf.get_f32_le();
10694        for v in &mut __struct.vel_variance {
10695            let val = buf.get_f32_le();
10696            *v = val;
10697        }
10698        for v in &mut __struct.pos_variance {
10699            let val = buf.get_f32_le();
10700            *v = val;
10701        }
10702        for v in &mut __struct.q {
10703            let val = buf.get_f32_le();
10704            *v = val;
10705        }
10706        __struct.roll_rate = buf.get_f32_le();
10707        __struct.pitch_rate = buf.get_f32_le();
10708        __struct.yaw_rate = buf.get_f32_le();
10709        Ok(__struct)
10710    }
10711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10712        let mut __tmp = BytesMut::new(bytes);
10713        #[allow(clippy::absurd_extreme_comparisons)]
10714        #[allow(unused_comparisons)]
10715        if __tmp.remaining() < Self::ENCODED_LEN {
10716            panic!(
10717                "buffer is too small (need {} bytes, but got {})",
10718                Self::ENCODED_LEN,
10719                __tmp.remaining(),
10720            )
10721        }
10722        __tmp.put_u64_le(self.time_usec);
10723        __tmp.put_f32_le(self.x_acc);
10724        __tmp.put_f32_le(self.y_acc);
10725        __tmp.put_f32_le(self.z_acc);
10726        __tmp.put_f32_le(self.x_vel);
10727        __tmp.put_f32_le(self.y_vel);
10728        __tmp.put_f32_le(self.z_vel);
10729        __tmp.put_f32_le(self.x_pos);
10730        __tmp.put_f32_le(self.y_pos);
10731        __tmp.put_f32_le(self.z_pos);
10732        __tmp.put_f32_le(self.airspeed);
10733        for val in &self.vel_variance {
10734            __tmp.put_f32_le(*val);
10735        }
10736        for val in &self.pos_variance {
10737            __tmp.put_f32_le(*val);
10738        }
10739        for val in &self.q {
10740            __tmp.put_f32_le(*val);
10741        }
10742        __tmp.put_f32_le(self.roll_rate);
10743        __tmp.put_f32_le(self.pitch_rate);
10744        __tmp.put_f32_le(self.yaw_rate);
10745        if matches!(version, MavlinkVersion::V2) {
10746            let len = __tmp.len();
10747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10748        } else {
10749            __tmp.len()
10750        }
10751    }
10752}
10753#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10754#[doc = ""]
10755#[doc = "ID: 411"]
10756#[derive(Debug, Clone, PartialEq)]
10757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10759#[cfg_attr(feature = "ts", derive(TS))]
10760#[cfg_attr(feature = "ts", ts(export))]
10761pub struct CURRENT_EVENT_SEQUENCE_DATA {
10762    #[doc = "Sequence number."]
10763    pub sequence: u16,
10764    #[doc = "Flag bitset."]
10765    pub flags: MavEventCurrentSequenceFlags,
10766}
10767impl CURRENT_EVENT_SEQUENCE_DATA {
10768    pub const ENCODED_LEN: usize = 3usize;
10769    pub const DEFAULT: Self = Self {
10770        sequence: 0_u16,
10771        flags: MavEventCurrentSequenceFlags::DEFAULT,
10772    };
10773    #[cfg(feature = "arbitrary")]
10774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10775        use arbitrary::{Arbitrary, Unstructured};
10776        let mut buf = [0u8; 1024];
10777        rng.fill_bytes(&mut buf);
10778        let mut unstructured = Unstructured::new(&buf);
10779        Self::arbitrary(&mut unstructured).unwrap_or_default()
10780    }
10781}
10782impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10783    fn default() -> Self {
10784        Self::DEFAULT.clone()
10785    }
10786}
10787impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10788    type Message = MavMessage;
10789    const ID: u32 = 411u32;
10790    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10791    const EXTRA_CRC: u8 = 106u8;
10792    const ENCODED_LEN: usize = 3usize;
10793    fn deser(
10794        _version: MavlinkVersion,
10795        __input: &[u8],
10796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10797        let avail_len = __input.len();
10798        let mut payload_buf = [0; Self::ENCODED_LEN];
10799        let mut buf = if avail_len < Self::ENCODED_LEN {
10800            payload_buf[0..avail_len].copy_from_slice(__input);
10801            Bytes::new(&payload_buf)
10802        } else {
10803            Bytes::new(__input)
10804        };
10805        let mut __struct = Self::default();
10806        __struct.sequence = buf.get_u16_le();
10807        let tmp = buf.get_u8();
10808        __struct.flags =
10809            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10810                enum_type: "MavEventCurrentSequenceFlags",
10811                value: tmp as u64,
10812            })?;
10813        Ok(__struct)
10814    }
10815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10816        let mut __tmp = BytesMut::new(bytes);
10817        #[allow(clippy::absurd_extreme_comparisons)]
10818        #[allow(unused_comparisons)]
10819        if __tmp.remaining() < Self::ENCODED_LEN {
10820            panic!(
10821                "buffer is too small (need {} bytes, but got {})",
10822                Self::ENCODED_LEN,
10823                __tmp.remaining(),
10824            )
10825        }
10826        __tmp.put_u16_le(self.sequence);
10827        __tmp.put_u8(self.flags as u8);
10828        if matches!(version, MavlinkVersion::V2) {
10829            let len = __tmp.len();
10830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10831        } else {
10832            __tmp.len()
10833        }
10834    }
10835}
10836#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10837#[doc = ""]
10838#[doc = "ID: 436"]
10839#[derive(Debug, Clone, PartialEq)]
10840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10842#[cfg_attr(feature = "ts", derive(TS))]
10843#[cfg_attr(feature = "ts", ts(export))]
10844pub struct CURRENT_MODE_DATA {
10845    #[doc = "A bitfield for use for autopilot-specific flags"]
10846    pub custom_mode: u32,
10847    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10848    pub intended_custom_mode: u32,
10849    #[doc = "Standard mode."]
10850    pub standard_mode: MavStandardMode,
10851}
10852impl CURRENT_MODE_DATA {
10853    pub const ENCODED_LEN: usize = 9usize;
10854    pub const DEFAULT: Self = Self {
10855        custom_mode: 0_u32,
10856        intended_custom_mode: 0_u32,
10857        standard_mode: MavStandardMode::DEFAULT,
10858    };
10859    #[cfg(feature = "arbitrary")]
10860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10861        use arbitrary::{Arbitrary, Unstructured};
10862        let mut buf = [0u8; 1024];
10863        rng.fill_bytes(&mut buf);
10864        let mut unstructured = Unstructured::new(&buf);
10865        Self::arbitrary(&mut unstructured).unwrap_or_default()
10866    }
10867}
10868impl Default for CURRENT_MODE_DATA {
10869    fn default() -> Self {
10870        Self::DEFAULT.clone()
10871    }
10872}
10873impl MessageData for CURRENT_MODE_DATA {
10874    type Message = MavMessage;
10875    const ID: u32 = 436u32;
10876    const NAME: &'static str = "CURRENT_MODE";
10877    const EXTRA_CRC: u8 = 193u8;
10878    const ENCODED_LEN: usize = 9usize;
10879    fn deser(
10880        _version: MavlinkVersion,
10881        __input: &[u8],
10882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10883        let avail_len = __input.len();
10884        let mut payload_buf = [0; Self::ENCODED_LEN];
10885        let mut buf = if avail_len < Self::ENCODED_LEN {
10886            payload_buf[0..avail_len].copy_from_slice(__input);
10887            Bytes::new(&payload_buf)
10888        } else {
10889            Bytes::new(__input)
10890        };
10891        let mut __struct = Self::default();
10892        __struct.custom_mode = buf.get_u32_le();
10893        __struct.intended_custom_mode = buf.get_u32_le();
10894        let tmp = buf.get_u8();
10895        __struct.standard_mode =
10896            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10897                enum_type: "MavStandardMode",
10898                value: tmp as u64,
10899            })?;
10900        Ok(__struct)
10901    }
10902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10903        let mut __tmp = BytesMut::new(bytes);
10904        #[allow(clippy::absurd_extreme_comparisons)]
10905        #[allow(unused_comparisons)]
10906        if __tmp.remaining() < Self::ENCODED_LEN {
10907            panic!(
10908                "buffer is too small (need {} bytes, but got {})",
10909                Self::ENCODED_LEN,
10910                __tmp.remaining(),
10911            )
10912        }
10913        __tmp.put_u32_le(self.custom_mode);
10914        __tmp.put_u32_le(self.intended_custom_mode);
10915        __tmp.put_u8(self.standard_mode as u8);
10916        if matches!(version, MavlinkVersion::V2) {
10917            let len = __tmp.len();
10918            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10919        } else {
10920            __tmp.len()
10921        }
10922    }
10923}
10924#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10925#[doc = "Data stream status information."]
10926#[doc = ""]
10927#[doc = "ID: 67"]
10928#[derive(Debug, Clone, PartialEq)]
10929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10931#[cfg_attr(feature = "ts", derive(TS))]
10932#[cfg_attr(feature = "ts", ts(export))]
10933pub struct DATA_STREAM_DATA {
10934    #[doc = "The message rate"]
10935    pub message_rate: u16,
10936    #[doc = "The ID of the requested data stream"]
10937    pub stream_id: u8,
10938    #[doc = "1 stream is enabled, 0 stream is stopped."]
10939    pub on_off: u8,
10940}
10941impl DATA_STREAM_DATA {
10942    pub const ENCODED_LEN: usize = 4usize;
10943    pub const DEFAULT: Self = Self {
10944        message_rate: 0_u16,
10945        stream_id: 0_u8,
10946        on_off: 0_u8,
10947    };
10948    #[cfg(feature = "arbitrary")]
10949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10950        use arbitrary::{Arbitrary, Unstructured};
10951        let mut buf = [0u8; 1024];
10952        rng.fill_bytes(&mut buf);
10953        let mut unstructured = Unstructured::new(&buf);
10954        Self::arbitrary(&mut unstructured).unwrap_or_default()
10955    }
10956}
10957impl Default for DATA_STREAM_DATA {
10958    fn default() -> Self {
10959        Self::DEFAULT.clone()
10960    }
10961}
10962impl MessageData for DATA_STREAM_DATA {
10963    type Message = MavMessage;
10964    const ID: u32 = 67u32;
10965    const NAME: &'static str = "DATA_STREAM";
10966    const EXTRA_CRC: u8 = 21u8;
10967    const ENCODED_LEN: usize = 4usize;
10968    fn deser(
10969        _version: MavlinkVersion,
10970        __input: &[u8],
10971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10972        let avail_len = __input.len();
10973        let mut payload_buf = [0; Self::ENCODED_LEN];
10974        let mut buf = if avail_len < Self::ENCODED_LEN {
10975            payload_buf[0..avail_len].copy_from_slice(__input);
10976            Bytes::new(&payload_buf)
10977        } else {
10978            Bytes::new(__input)
10979        };
10980        let mut __struct = Self::default();
10981        __struct.message_rate = buf.get_u16_le();
10982        __struct.stream_id = buf.get_u8();
10983        __struct.on_off = buf.get_u8();
10984        Ok(__struct)
10985    }
10986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10987        let mut __tmp = BytesMut::new(bytes);
10988        #[allow(clippy::absurd_extreme_comparisons)]
10989        #[allow(unused_comparisons)]
10990        if __tmp.remaining() < Self::ENCODED_LEN {
10991            panic!(
10992                "buffer is too small (need {} bytes, but got {})",
10993                Self::ENCODED_LEN,
10994                __tmp.remaining(),
10995            )
10996        }
10997        __tmp.put_u16_le(self.message_rate);
10998        __tmp.put_u8(self.stream_id);
10999        __tmp.put_u8(self.on_off);
11000        if matches!(version, MavlinkVersion::V2) {
11001            let len = __tmp.len();
11002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11003        } else {
11004            __tmp.len()
11005        }
11006    }
11007}
11008#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11009#[doc = ""]
11010#[doc = "ID: 130"]
11011#[derive(Debug, Clone, PartialEq)]
11012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11014#[cfg_attr(feature = "ts", derive(TS))]
11015#[cfg_attr(feature = "ts", ts(export))]
11016pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11017    #[doc = "total data size (set on ACK only)."]
11018    pub size: u32,
11019    #[doc = "Width of a matrix or image."]
11020    pub width: u16,
11021    #[doc = "Height of a matrix or image."]
11022    pub height: u16,
11023    #[doc = "Number of packets being sent (set on ACK only)."]
11024    pub packets: u16,
11025    #[doc = "Type of requested/acknowledged data."]
11026    pub mavtype: MavlinkDataStreamType,
11027    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11028    pub payload: u8,
11029    #[doc = "JPEG quality. Values: [1-100]."]
11030    pub jpg_quality: u8,
11031}
11032impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11033    pub const ENCODED_LEN: usize = 13usize;
11034    pub const DEFAULT: Self = Self {
11035        size: 0_u32,
11036        width: 0_u16,
11037        height: 0_u16,
11038        packets: 0_u16,
11039        mavtype: MavlinkDataStreamType::DEFAULT,
11040        payload: 0_u8,
11041        jpg_quality: 0_u8,
11042    };
11043    #[cfg(feature = "arbitrary")]
11044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11045        use arbitrary::{Arbitrary, Unstructured};
11046        let mut buf = [0u8; 1024];
11047        rng.fill_bytes(&mut buf);
11048        let mut unstructured = Unstructured::new(&buf);
11049        Self::arbitrary(&mut unstructured).unwrap_or_default()
11050    }
11051}
11052impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11053    fn default() -> Self {
11054        Self::DEFAULT.clone()
11055    }
11056}
11057impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11058    type Message = MavMessage;
11059    const ID: u32 = 130u32;
11060    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11061    const EXTRA_CRC: u8 = 29u8;
11062    const ENCODED_LEN: usize = 13usize;
11063    fn deser(
11064        _version: MavlinkVersion,
11065        __input: &[u8],
11066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11067        let avail_len = __input.len();
11068        let mut payload_buf = [0; Self::ENCODED_LEN];
11069        let mut buf = if avail_len < Self::ENCODED_LEN {
11070            payload_buf[0..avail_len].copy_from_slice(__input);
11071            Bytes::new(&payload_buf)
11072        } else {
11073            Bytes::new(__input)
11074        };
11075        let mut __struct = Self::default();
11076        __struct.size = buf.get_u32_le();
11077        __struct.width = buf.get_u16_le();
11078        __struct.height = buf.get_u16_le();
11079        __struct.packets = buf.get_u16_le();
11080        let tmp = buf.get_u8();
11081        __struct.mavtype =
11082            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11083                enum_type: "MavlinkDataStreamType",
11084                value: tmp as u64,
11085            })?;
11086        __struct.payload = buf.get_u8();
11087        __struct.jpg_quality = buf.get_u8();
11088        Ok(__struct)
11089    }
11090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11091        let mut __tmp = BytesMut::new(bytes);
11092        #[allow(clippy::absurd_extreme_comparisons)]
11093        #[allow(unused_comparisons)]
11094        if __tmp.remaining() < Self::ENCODED_LEN {
11095            panic!(
11096                "buffer is too small (need {} bytes, but got {})",
11097                Self::ENCODED_LEN,
11098                __tmp.remaining(),
11099            )
11100        }
11101        __tmp.put_u32_le(self.size);
11102        __tmp.put_u16_le(self.width);
11103        __tmp.put_u16_le(self.height);
11104        __tmp.put_u16_le(self.packets);
11105        __tmp.put_u8(self.mavtype as u8);
11106        __tmp.put_u8(self.payload);
11107        __tmp.put_u8(self.jpg_quality);
11108        if matches!(version, MavlinkVersion::V2) {
11109            let len = __tmp.len();
11110            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11111        } else {
11112            __tmp.len()
11113        }
11114    }
11115}
11116#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
11117#[doc = ""]
11118#[doc = "ID: 254"]
11119#[derive(Debug, Clone, PartialEq)]
11120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11122#[cfg_attr(feature = "ts", derive(TS))]
11123#[cfg_attr(feature = "ts", ts(export))]
11124pub struct DEBUG_DATA {
11125    #[doc = "Timestamp (time since system boot)."]
11126    pub time_boot_ms: u32,
11127    #[doc = "DEBUG value"]
11128    pub value: f32,
11129    #[doc = "index of debug variable"]
11130    pub ind: u8,
11131}
11132impl DEBUG_DATA {
11133    pub const ENCODED_LEN: usize = 9usize;
11134    pub const DEFAULT: Self = Self {
11135        time_boot_ms: 0_u32,
11136        value: 0.0_f32,
11137        ind: 0_u8,
11138    };
11139    #[cfg(feature = "arbitrary")]
11140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11141        use arbitrary::{Arbitrary, Unstructured};
11142        let mut buf = [0u8; 1024];
11143        rng.fill_bytes(&mut buf);
11144        let mut unstructured = Unstructured::new(&buf);
11145        Self::arbitrary(&mut unstructured).unwrap_or_default()
11146    }
11147}
11148impl Default for DEBUG_DATA {
11149    fn default() -> Self {
11150        Self::DEFAULT.clone()
11151    }
11152}
11153impl MessageData for DEBUG_DATA {
11154    type Message = MavMessage;
11155    const ID: u32 = 254u32;
11156    const NAME: &'static str = "DEBUG";
11157    const EXTRA_CRC: u8 = 46u8;
11158    const ENCODED_LEN: usize = 9usize;
11159    fn deser(
11160        _version: MavlinkVersion,
11161        __input: &[u8],
11162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11163        let avail_len = __input.len();
11164        let mut payload_buf = [0; Self::ENCODED_LEN];
11165        let mut buf = if avail_len < Self::ENCODED_LEN {
11166            payload_buf[0..avail_len].copy_from_slice(__input);
11167            Bytes::new(&payload_buf)
11168        } else {
11169            Bytes::new(__input)
11170        };
11171        let mut __struct = Self::default();
11172        __struct.time_boot_ms = buf.get_u32_le();
11173        __struct.value = buf.get_f32_le();
11174        __struct.ind = buf.get_u8();
11175        Ok(__struct)
11176    }
11177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11178        let mut __tmp = BytesMut::new(bytes);
11179        #[allow(clippy::absurd_extreme_comparisons)]
11180        #[allow(unused_comparisons)]
11181        if __tmp.remaining() < Self::ENCODED_LEN {
11182            panic!(
11183                "buffer is too small (need {} bytes, but got {})",
11184                Self::ENCODED_LEN,
11185                __tmp.remaining(),
11186            )
11187        }
11188        __tmp.put_u32_le(self.time_boot_ms);
11189        __tmp.put_f32_le(self.value);
11190        __tmp.put_u8(self.ind);
11191        if matches!(version, MavlinkVersion::V2) {
11192            let len = __tmp.len();
11193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11194        } else {
11195            __tmp.len()
11196        }
11197    }
11198}
11199#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
11200#[doc = ""]
11201#[doc = "ID: 350"]
11202#[derive(Debug, Clone, PartialEq)]
11203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11205#[cfg_attr(feature = "ts", derive(TS))]
11206#[cfg_attr(feature = "ts", ts(export))]
11207pub struct DEBUG_FLOAT_ARRAY_DATA {
11208    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11209    pub time_usec: u64,
11210    #[doc = "Unique ID used to discriminate between arrays"]
11211    pub array_id: u16,
11212    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11213    #[cfg_attr(feature = "ts", ts(type = "string"))]
11214    pub name: CharArray<10>,
11215    #[doc = "data"]
11216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11218    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11219    pub data: [f32; 58],
11220}
11221impl DEBUG_FLOAT_ARRAY_DATA {
11222    pub const ENCODED_LEN: usize = 252usize;
11223    pub const DEFAULT: Self = Self {
11224        time_usec: 0_u64,
11225        array_id: 0_u16,
11226        name: CharArray::new([0_u8; 10usize]),
11227        data: [0.0_f32; 58usize],
11228    };
11229    #[cfg(feature = "arbitrary")]
11230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11231        use arbitrary::{Arbitrary, Unstructured};
11232        let mut buf = [0u8; 1024];
11233        rng.fill_bytes(&mut buf);
11234        let mut unstructured = Unstructured::new(&buf);
11235        Self::arbitrary(&mut unstructured).unwrap_or_default()
11236    }
11237}
11238impl Default for DEBUG_FLOAT_ARRAY_DATA {
11239    fn default() -> Self {
11240        Self::DEFAULT.clone()
11241    }
11242}
11243impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11244    type Message = MavMessage;
11245    const ID: u32 = 350u32;
11246    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11247    const EXTRA_CRC: u8 = 232u8;
11248    const ENCODED_LEN: usize = 252usize;
11249    fn deser(
11250        _version: MavlinkVersion,
11251        __input: &[u8],
11252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11253        let avail_len = __input.len();
11254        let mut payload_buf = [0; Self::ENCODED_LEN];
11255        let mut buf = if avail_len < Self::ENCODED_LEN {
11256            payload_buf[0..avail_len].copy_from_slice(__input);
11257            Bytes::new(&payload_buf)
11258        } else {
11259            Bytes::new(__input)
11260        };
11261        let mut __struct = Self::default();
11262        __struct.time_usec = buf.get_u64_le();
11263        __struct.array_id = buf.get_u16_le();
11264        let mut tmp = [0_u8; 10usize];
11265        for v in &mut tmp {
11266            *v = buf.get_u8();
11267        }
11268        __struct.name = CharArray::new(tmp);
11269        for v in &mut __struct.data {
11270            let val = buf.get_f32_le();
11271            *v = val;
11272        }
11273        Ok(__struct)
11274    }
11275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11276        let mut __tmp = BytesMut::new(bytes);
11277        #[allow(clippy::absurd_extreme_comparisons)]
11278        #[allow(unused_comparisons)]
11279        if __tmp.remaining() < Self::ENCODED_LEN {
11280            panic!(
11281                "buffer is too small (need {} bytes, but got {})",
11282                Self::ENCODED_LEN,
11283                __tmp.remaining(),
11284            )
11285        }
11286        __tmp.put_u64_le(self.time_usec);
11287        __tmp.put_u16_le(self.array_id);
11288        for val in &self.name {
11289            __tmp.put_u8(*val);
11290        }
11291        if matches!(version, MavlinkVersion::V2) {
11292            for val in &self.data {
11293                __tmp.put_f32_le(*val);
11294            }
11295            let len = __tmp.len();
11296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11297        } else {
11298            __tmp.len()
11299        }
11300    }
11301}
11302#[doc = "To debug something using a named 3D vector."]
11303#[doc = ""]
11304#[doc = "ID: 250"]
11305#[derive(Debug, Clone, PartialEq)]
11306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11308#[cfg_attr(feature = "ts", derive(TS))]
11309#[cfg_attr(feature = "ts", ts(export))]
11310pub struct DEBUG_VECT_DATA {
11311    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11312    pub time_usec: u64,
11313    #[doc = "x"]
11314    pub x: f32,
11315    #[doc = "y"]
11316    pub y: f32,
11317    #[doc = "z"]
11318    pub z: f32,
11319    #[doc = "Name"]
11320    #[cfg_attr(feature = "ts", ts(type = "string"))]
11321    pub name: CharArray<10>,
11322}
11323impl DEBUG_VECT_DATA {
11324    pub const ENCODED_LEN: usize = 30usize;
11325    pub const DEFAULT: Self = Self {
11326        time_usec: 0_u64,
11327        x: 0.0_f32,
11328        y: 0.0_f32,
11329        z: 0.0_f32,
11330        name: CharArray::new([0_u8; 10usize]),
11331    };
11332    #[cfg(feature = "arbitrary")]
11333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11334        use arbitrary::{Arbitrary, Unstructured};
11335        let mut buf = [0u8; 1024];
11336        rng.fill_bytes(&mut buf);
11337        let mut unstructured = Unstructured::new(&buf);
11338        Self::arbitrary(&mut unstructured).unwrap_or_default()
11339    }
11340}
11341impl Default for DEBUG_VECT_DATA {
11342    fn default() -> Self {
11343        Self::DEFAULT.clone()
11344    }
11345}
11346impl MessageData for DEBUG_VECT_DATA {
11347    type Message = MavMessage;
11348    const ID: u32 = 250u32;
11349    const NAME: &'static str = "DEBUG_VECT";
11350    const EXTRA_CRC: u8 = 49u8;
11351    const ENCODED_LEN: usize = 30usize;
11352    fn deser(
11353        _version: MavlinkVersion,
11354        __input: &[u8],
11355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11356        let avail_len = __input.len();
11357        let mut payload_buf = [0; Self::ENCODED_LEN];
11358        let mut buf = if avail_len < Self::ENCODED_LEN {
11359            payload_buf[0..avail_len].copy_from_slice(__input);
11360            Bytes::new(&payload_buf)
11361        } else {
11362            Bytes::new(__input)
11363        };
11364        let mut __struct = Self::default();
11365        __struct.time_usec = buf.get_u64_le();
11366        __struct.x = buf.get_f32_le();
11367        __struct.y = buf.get_f32_le();
11368        __struct.z = buf.get_f32_le();
11369        let mut tmp = [0_u8; 10usize];
11370        for v in &mut tmp {
11371            *v = buf.get_u8();
11372        }
11373        __struct.name = CharArray::new(tmp);
11374        Ok(__struct)
11375    }
11376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11377        let mut __tmp = BytesMut::new(bytes);
11378        #[allow(clippy::absurd_extreme_comparisons)]
11379        #[allow(unused_comparisons)]
11380        if __tmp.remaining() < Self::ENCODED_LEN {
11381            panic!(
11382                "buffer is too small (need {} bytes, but got {})",
11383                Self::ENCODED_LEN,
11384                __tmp.remaining(),
11385            )
11386        }
11387        __tmp.put_u64_le(self.time_usec);
11388        __tmp.put_f32_le(self.x);
11389        __tmp.put_f32_le(self.y);
11390        __tmp.put_f32_le(self.z);
11391        for val in &self.name {
11392            __tmp.put_u8(*val);
11393        }
11394        if matches!(version, MavlinkVersion::V2) {
11395            let len = __tmp.len();
11396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11397        } else {
11398            __tmp.len()
11399        }
11400    }
11401}
11402#[doc = "Distance sensor information for an onboard rangefinder."]
11403#[doc = ""]
11404#[doc = "ID: 132"]
11405#[derive(Debug, Clone, PartialEq)]
11406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11408#[cfg_attr(feature = "ts", derive(TS))]
11409#[cfg_attr(feature = "ts", ts(export))]
11410pub struct DISTANCE_SENSOR_DATA {
11411    #[doc = "Timestamp (time since system boot)."]
11412    pub time_boot_ms: u32,
11413    #[doc = "Minimum distance the sensor can measure"]
11414    pub min_distance: u16,
11415    #[doc = "Maximum distance the sensor can measure"]
11416    pub max_distance: u16,
11417    #[doc = "Current distance reading"]
11418    pub current_distance: u16,
11419    #[doc = "Type of distance sensor."]
11420    pub mavtype: MavDistanceSensor,
11421    #[doc = "Onboard ID of the sensor"]
11422    pub id: u8,
11423    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11424    pub orientation: MavSensorOrientation,
11425    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11426    pub covariance: u8,
11427    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11429    pub horizontal_fov: f32,
11430    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11432    pub vertical_fov: f32,
11433    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11437    pub quaternion: [f32; 4],
11438    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11440    pub signal_quality: u8,
11441}
11442impl DISTANCE_SENSOR_DATA {
11443    pub const ENCODED_LEN: usize = 39usize;
11444    pub const DEFAULT: Self = Self {
11445        time_boot_ms: 0_u32,
11446        min_distance: 0_u16,
11447        max_distance: 0_u16,
11448        current_distance: 0_u16,
11449        mavtype: MavDistanceSensor::DEFAULT,
11450        id: 0_u8,
11451        orientation: MavSensorOrientation::DEFAULT,
11452        covariance: 0_u8,
11453        horizontal_fov: 0.0_f32,
11454        vertical_fov: 0.0_f32,
11455        quaternion: [0.0_f32; 4usize],
11456        signal_quality: 0_u8,
11457    };
11458    #[cfg(feature = "arbitrary")]
11459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11460        use arbitrary::{Arbitrary, Unstructured};
11461        let mut buf = [0u8; 1024];
11462        rng.fill_bytes(&mut buf);
11463        let mut unstructured = Unstructured::new(&buf);
11464        Self::arbitrary(&mut unstructured).unwrap_or_default()
11465    }
11466}
11467impl Default for DISTANCE_SENSOR_DATA {
11468    fn default() -> Self {
11469        Self::DEFAULT.clone()
11470    }
11471}
11472impl MessageData for DISTANCE_SENSOR_DATA {
11473    type Message = MavMessage;
11474    const ID: u32 = 132u32;
11475    const NAME: &'static str = "DISTANCE_SENSOR";
11476    const EXTRA_CRC: u8 = 85u8;
11477    const ENCODED_LEN: usize = 39usize;
11478    fn deser(
11479        _version: MavlinkVersion,
11480        __input: &[u8],
11481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11482        let avail_len = __input.len();
11483        let mut payload_buf = [0; Self::ENCODED_LEN];
11484        let mut buf = if avail_len < Self::ENCODED_LEN {
11485            payload_buf[0..avail_len].copy_from_slice(__input);
11486            Bytes::new(&payload_buf)
11487        } else {
11488            Bytes::new(__input)
11489        };
11490        let mut __struct = Self::default();
11491        __struct.time_boot_ms = buf.get_u32_le();
11492        __struct.min_distance = buf.get_u16_le();
11493        __struct.max_distance = buf.get_u16_le();
11494        __struct.current_distance = buf.get_u16_le();
11495        let tmp = buf.get_u8();
11496        __struct.mavtype =
11497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11498                enum_type: "MavDistanceSensor",
11499                value: tmp as u64,
11500            })?;
11501        __struct.id = buf.get_u8();
11502        let tmp = buf.get_u8();
11503        __struct.orientation =
11504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11505                enum_type: "MavSensorOrientation",
11506                value: tmp as u64,
11507            })?;
11508        __struct.covariance = buf.get_u8();
11509        __struct.horizontal_fov = buf.get_f32_le();
11510        __struct.vertical_fov = buf.get_f32_le();
11511        for v in &mut __struct.quaternion {
11512            let val = buf.get_f32_le();
11513            *v = val;
11514        }
11515        __struct.signal_quality = buf.get_u8();
11516        Ok(__struct)
11517    }
11518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11519        let mut __tmp = BytesMut::new(bytes);
11520        #[allow(clippy::absurd_extreme_comparisons)]
11521        #[allow(unused_comparisons)]
11522        if __tmp.remaining() < Self::ENCODED_LEN {
11523            panic!(
11524                "buffer is too small (need {} bytes, but got {})",
11525                Self::ENCODED_LEN,
11526                __tmp.remaining(),
11527            )
11528        }
11529        __tmp.put_u32_le(self.time_boot_ms);
11530        __tmp.put_u16_le(self.min_distance);
11531        __tmp.put_u16_le(self.max_distance);
11532        __tmp.put_u16_le(self.current_distance);
11533        __tmp.put_u8(self.mavtype as u8);
11534        __tmp.put_u8(self.id);
11535        __tmp.put_u8(self.orientation as u8);
11536        __tmp.put_u8(self.covariance);
11537        if matches!(version, MavlinkVersion::V2) {
11538            __tmp.put_f32_le(self.horizontal_fov);
11539            __tmp.put_f32_le(self.vertical_fov);
11540            for val in &self.quaternion {
11541                __tmp.put_f32_le(*val);
11542            }
11543            __tmp.put_u8(self.signal_quality);
11544            let len = __tmp.len();
11545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11546        } else {
11547            __tmp.len()
11548        }
11549    }
11550}
11551#[doc = "EFI status output."]
11552#[doc = ""]
11553#[doc = "ID: 225"]
11554#[derive(Debug, Clone, PartialEq)]
11555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11557#[cfg_attr(feature = "ts", derive(TS))]
11558#[cfg_attr(feature = "ts", ts(export))]
11559pub struct EFI_STATUS_DATA {
11560    #[doc = "ECU index"]
11561    pub ecu_index: f32,
11562    #[doc = "RPM"]
11563    pub rpm: f32,
11564    #[doc = "Fuel consumed"]
11565    pub fuel_consumed: f32,
11566    #[doc = "Fuel flow rate"]
11567    pub fuel_flow: f32,
11568    #[doc = "Engine load"]
11569    pub engine_load: f32,
11570    #[doc = "Throttle position"]
11571    pub throttle_position: f32,
11572    #[doc = "Spark dwell time"]
11573    pub spark_dwell_time: f32,
11574    #[doc = "Barometric pressure"]
11575    pub barometric_pressure: f32,
11576    #[doc = "Intake manifold pressure("]
11577    pub intake_manifold_pressure: f32,
11578    #[doc = "Intake manifold temperature"]
11579    pub intake_manifold_temperature: f32,
11580    #[doc = "Cylinder head temperature"]
11581    pub cylinder_head_temperature: f32,
11582    #[doc = "Ignition timing (Crank angle degrees)"]
11583    pub ignition_timing: f32,
11584    #[doc = "Injection time"]
11585    pub injection_time: f32,
11586    #[doc = "Exhaust gas temperature"]
11587    pub exhaust_gas_temperature: f32,
11588    #[doc = "Output throttle"]
11589    pub throttle_out: f32,
11590    #[doc = "Pressure/temperature compensation"]
11591    pub pt_compensation: f32,
11592    #[doc = "EFI health status"]
11593    pub health: u8,
11594    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11596    pub ignition_voltage: f32,
11597    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11599    pub fuel_pressure: f32,
11600}
11601impl EFI_STATUS_DATA {
11602    pub const ENCODED_LEN: usize = 73usize;
11603    pub const DEFAULT: Self = Self {
11604        ecu_index: 0.0_f32,
11605        rpm: 0.0_f32,
11606        fuel_consumed: 0.0_f32,
11607        fuel_flow: 0.0_f32,
11608        engine_load: 0.0_f32,
11609        throttle_position: 0.0_f32,
11610        spark_dwell_time: 0.0_f32,
11611        barometric_pressure: 0.0_f32,
11612        intake_manifold_pressure: 0.0_f32,
11613        intake_manifold_temperature: 0.0_f32,
11614        cylinder_head_temperature: 0.0_f32,
11615        ignition_timing: 0.0_f32,
11616        injection_time: 0.0_f32,
11617        exhaust_gas_temperature: 0.0_f32,
11618        throttle_out: 0.0_f32,
11619        pt_compensation: 0.0_f32,
11620        health: 0_u8,
11621        ignition_voltage: 0.0_f32,
11622        fuel_pressure: 0.0_f32,
11623    };
11624    #[cfg(feature = "arbitrary")]
11625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11626        use arbitrary::{Arbitrary, Unstructured};
11627        let mut buf = [0u8; 1024];
11628        rng.fill_bytes(&mut buf);
11629        let mut unstructured = Unstructured::new(&buf);
11630        Self::arbitrary(&mut unstructured).unwrap_or_default()
11631    }
11632}
11633impl Default for EFI_STATUS_DATA {
11634    fn default() -> Self {
11635        Self::DEFAULT.clone()
11636    }
11637}
11638impl MessageData for EFI_STATUS_DATA {
11639    type Message = MavMessage;
11640    const ID: u32 = 225u32;
11641    const NAME: &'static str = "EFI_STATUS";
11642    const EXTRA_CRC: u8 = 208u8;
11643    const ENCODED_LEN: usize = 73usize;
11644    fn deser(
11645        _version: MavlinkVersion,
11646        __input: &[u8],
11647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11648        let avail_len = __input.len();
11649        let mut payload_buf = [0; Self::ENCODED_LEN];
11650        let mut buf = if avail_len < Self::ENCODED_LEN {
11651            payload_buf[0..avail_len].copy_from_slice(__input);
11652            Bytes::new(&payload_buf)
11653        } else {
11654            Bytes::new(__input)
11655        };
11656        let mut __struct = Self::default();
11657        __struct.ecu_index = buf.get_f32_le();
11658        __struct.rpm = buf.get_f32_le();
11659        __struct.fuel_consumed = buf.get_f32_le();
11660        __struct.fuel_flow = buf.get_f32_le();
11661        __struct.engine_load = buf.get_f32_le();
11662        __struct.throttle_position = buf.get_f32_le();
11663        __struct.spark_dwell_time = buf.get_f32_le();
11664        __struct.barometric_pressure = buf.get_f32_le();
11665        __struct.intake_manifold_pressure = buf.get_f32_le();
11666        __struct.intake_manifold_temperature = buf.get_f32_le();
11667        __struct.cylinder_head_temperature = buf.get_f32_le();
11668        __struct.ignition_timing = buf.get_f32_le();
11669        __struct.injection_time = buf.get_f32_le();
11670        __struct.exhaust_gas_temperature = buf.get_f32_le();
11671        __struct.throttle_out = buf.get_f32_le();
11672        __struct.pt_compensation = buf.get_f32_le();
11673        __struct.health = buf.get_u8();
11674        __struct.ignition_voltage = buf.get_f32_le();
11675        __struct.fuel_pressure = buf.get_f32_le();
11676        Ok(__struct)
11677    }
11678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11679        let mut __tmp = BytesMut::new(bytes);
11680        #[allow(clippy::absurd_extreme_comparisons)]
11681        #[allow(unused_comparisons)]
11682        if __tmp.remaining() < Self::ENCODED_LEN {
11683            panic!(
11684                "buffer is too small (need {} bytes, but got {})",
11685                Self::ENCODED_LEN,
11686                __tmp.remaining(),
11687            )
11688        }
11689        __tmp.put_f32_le(self.ecu_index);
11690        __tmp.put_f32_le(self.rpm);
11691        __tmp.put_f32_le(self.fuel_consumed);
11692        __tmp.put_f32_le(self.fuel_flow);
11693        __tmp.put_f32_le(self.engine_load);
11694        __tmp.put_f32_le(self.throttle_position);
11695        __tmp.put_f32_le(self.spark_dwell_time);
11696        __tmp.put_f32_le(self.barometric_pressure);
11697        __tmp.put_f32_le(self.intake_manifold_pressure);
11698        __tmp.put_f32_le(self.intake_manifold_temperature);
11699        __tmp.put_f32_le(self.cylinder_head_temperature);
11700        __tmp.put_f32_le(self.ignition_timing);
11701        __tmp.put_f32_le(self.injection_time);
11702        __tmp.put_f32_le(self.exhaust_gas_temperature);
11703        __tmp.put_f32_le(self.throttle_out);
11704        __tmp.put_f32_le(self.pt_compensation);
11705        __tmp.put_u8(self.health);
11706        if matches!(version, MavlinkVersion::V2) {
11707            __tmp.put_f32_le(self.ignition_voltage);
11708            __tmp.put_f32_le(self.fuel_pressure);
11709            let len = __tmp.len();
11710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11711        } else {
11712            __tmp.len()
11713        }
11714    }
11715}
11716#[doc = "Extended EKF state estimates for ASLUAVs."]
11717#[doc = ""]
11718#[doc = "ID: 8007"]
11719#[derive(Debug, Clone, PartialEq)]
11720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11722#[cfg_attr(feature = "ts", derive(TS))]
11723#[cfg_attr(feature = "ts", ts(export))]
11724pub struct EKF_EXT_DATA {
11725    #[doc = "Time since system start"]
11726    pub timestamp: u64,
11727    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
11728    pub Windspeed: f32,
11729    #[doc = "Wind heading angle from North"]
11730    pub WindDir: f32,
11731    #[doc = "Z (Down) component of inertial wind velocity"]
11732    pub WindZ: f32,
11733    #[doc = "Magnitude of air velocity"]
11734    pub Airspeed: f32,
11735    #[doc = "Sideslip angle"]
11736    pub beta: f32,
11737    #[doc = "Angle of attack"]
11738    pub alpha: f32,
11739}
11740impl EKF_EXT_DATA {
11741    pub const ENCODED_LEN: usize = 32usize;
11742    pub const DEFAULT: Self = Self {
11743        timestamp: 0_u64,
11744        Windspeed: 0.0_f32,
11745        WindDir: 0.0_f32,
11746        WindZ: 0.0_f32,
11747        Airspeed: 0.0_f32,
11748        beta: 0.0_f32,
11749        alpha: 0.0_f32,
11750    };
11751    #[cfg(feature = "arbitrary")]
11752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11753        use arbitrary::{Arbitrary, Unstructured};
11754        let mut buf = [0u8; 1024];
11755        rng.fill_bytes(&mut buf);
11756        let mut unstructured = Unstructured::new(&buf);
11757        Self::arbitrary(&mut unstructured).unwrap_or_default()
11758    }
11759}
11760impl Default for EKF_EXT_DATA {
11761    fn default() -> Self {
11762        Self::DEFAULT.clone()
11763    }
11764}
11765impl MessageData for EKF_EXT_DATA {
11766    type Message = MavMessage;
11767    const ID: u32 = 8007u32;
11768    const NAME: &'static str = "EKF_EXT";
11769    const EXTRA_CRC: u8 = 64u8;
11770    const ENCODED_LEN: usize = 32usize;
11771    fn deser(
11772        _version: MavlinkVersion,
11773        __input: &[u8],
11774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11775        let avail_len = __input.len();
11776        let mut payload_buf = [0; Self::ENCODED_LEN];
11777        let mut buf = if avail_len < Self::ENCODED_LEN {
11778            payload_buf[0..avail_len].copy_from_slice(__input);
11779            Bytes::new(&payload_buf)
11780        } else {
11781            Bytes::new(__input)
11782        };
11783        let mut __struct = Self::default();
11784        __struct.timestamp = buf.get_u64_le();
11785        __struct.Windspeed = buf.get_f32_le();
11786        __struct.WindDir = buf.get_f32_le();
11787        __struct.WindZ = buf.get_f32_le();
11788        __struct.Airspeed = buf.get_f32_le();
11789        __struct.beta = buf.get_f32_le();
11790        __struct.alpha = buf.get_f32_le();
11791        Ok(__struct)
11792    }
11793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11794        let mut __tmp = BytesMut::new(bytes);
11795        #[allow(clippy::absurd_extreme_comparisons)]
11796        #[allow(unused_comparisons)]
11797        if __tmp.remaining() < Self::ENCODED_LEN {
11798            panic!(
11799                "buffer is too small (need {} bytes, but got {})",
11800                Self::ENCODED_LEN,
11801                __tmp.remaining(),
11802            )
11803        }
11804        __tmp.put_u64_le(self.timestamp);
11805        __tmp.put_f32_le(self.Windspeed);
11806        __tmp.put_f32_le(self.WindDir);
11807        __tmp.put_f32_le(self.WindZ);
11808        __tmp.put_f32_le(self.Airspeed);
11809        __tmp.put_f32_le(self.beta);
11810        __tmp.put_f32_le(self.alpha);
11811        if matches!(version, MavlinkVersion::V2) {
11812            let len = __tmp.len();
11813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11814        } else {
11815            __tmp.len()
11816        }
11817    }
11818}
11819#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11820#[doc = ""]
11821#[doc = "ID: 131"]
11822#[derive(Debug, Clone, PartialEq)]
11823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11825#[cfg_attr(feature = "ts", derive(TS))]
11826#[cfg_attr(feature = "ts", ts(export))]
11827pub struct ENCAPSULATED_DATA_DATA {
11828    #[doc = "sequence number (starting with 0 on every transmission)"]
11829    pub seqnr: u16,
11830    #[doc = "image data bytes"]
11831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11833    pub data: [u8; 253],
11834}
11835impl ENCAPSULATED_DATA_DATA {
11836    pub const ENCODED_LEN: usize = 255usize;
11837    pub const DEFAULT: Self = Self {
11838        seqnr: 0_u16,
11839        data: [0_u8; 253usize],
11840    };
11841    #[cfg(feature = "arbitrary")]
11842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11843        use arbitrary::{Arbitrary, Unstructured};
11844        let mut buf = [0u8; 1024];
11845        rng.fill_bytes(&mut buf);
11846        let mut unstructured = Unstructured::new(&buf);
11847        Self::arbitrary(&mut unstructured).unwrap_or_default()
11848    }
11849}
11850impl Default for ENCAPSULATED_DATA_DATA {
11851    fn default() -> Self {
11852        Self::DEFAULT.clone()
11853    }
11854}
11855impl MessageData for ENCAPSULATED_DATA_DATA {
11856    type Message = MavMessage;
11857    const ID: u32 = 131u32;
11858    const NAME: &'static str = "ENCAPSULATED_DATA";
11859    const EXTRA_CRC: u8 = 223u8;
11860    const ENCODED_LEN: usize = 255usize;
11861    fn deser(
11862        _version: MavlinkVersion,
11863        __input: &[u8],
11864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11865        let avail_len = __input.len();
11866        let mut payload_buf = [0; Self::ENCODED_LEN];
11867        let mut buf = if avail_len < Self::ENCODED_LEN {
11868            payload_buf[0..avail_len].copy_from_slice(__input);
11869            Bytes::new(&payload_buf)
11870        } else {
11871            Bytes::new(__input)
11872        };
11873        let mut __struct = Self::default();
11874        __struct.seqnr = buf.get_u16_le();
11875        for v in &mut __struct.data {
11876            let val = buf.get_u8();
11877            *v = val;
11878        }
11879        Ok(__struct)
11880    }
11881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11882        let mut __tmp = BytesMut::new(bytes);
11883        #[allow(clippy::absurd_extreme_comparisons)]
11884        #[allow(unused_comparisons)]
11885        if __tmp.remaining() < Self::ENCODED_LEN {
11886            panic!(
11887                "buffer is too small (need {} bytes, but got {})",
11888                Self::ENCODED_LEN,
11889                __tmp.remaining(),
11890            )
11891        }
11892        __tmp.put_u16_le(self.seqnr);
11893        for val in &self.data {
11894            __tmp.put_u8(*val);
11895        }
11896        if matches!(version, MavlinkVersion::V2) {
11897            let len = __tmp.len();
11898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11899        } else {
11900            __tmp.len()
11901        }
11902    }
11903}
11904#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11905#[doc = ""]
11906#[doc = "ID: 290"]
11907#[derive(Debug, Clone, PartialEq)]
11908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11910#[cfg_attr(feature = "ts", derive(TS))]
11911#[cfg_attr(feature = "ts", ts(export))]
11912pub struct ESC_INFO_DATA {
11913    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11914    pub time_usec: u64,
11915    #[doc = "Number of reported errors by each ESC since boot."]
11916    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11917    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11918    pub error_count: [u32; 4],
11919    #[doc = "Counter of data packets received."]
11920    pub counter: u16,
11921    #[doc = "Bitmap of ESC failure flags."]
11922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11923    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11924    pub failure_flags: [u16; 4],
11925    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11926    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11927    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11928    pub temperature: [i16; 4],
11929    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11930    pub index: u8,
11931    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11932    pub count: u8,
11933    #[doc = "Connection type protocol for all ESC."]
11934    pub connection_type: EscConnectionType,
11935    #[doc = "Information regarding online/offline status of each ESC."]
11936    pub info: u8,
11937}
11938impl ESC_INFO_DATA {
11939    pub const ENCODED_LEN: usize = 46usize;
11940    pub const DEFAULT: Self = Self {
11941        time_usec: 0_u64,
11942        error_count: [0_u32; 4usize],
11943        counter: 0_u16,
11944        failure_flags: [0_u16; 4usize],
11945        temperature: [0_i16; 4usize],
11946        index: 0_u8,
11947        count: 0_u8,
11948        connection_type: EscConnectionType::DEFAULT,
11949        info: 0_u8,
11950    };
11951    #[cfg(feature = "arbitrary")]
11952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11953        use arbitrary::{Arbitrary, Unstructured};
11954        let mut buf = [0u8; 1024];
11955        rng.fill_bytes(&mut buf);
11956        let mut unstructured = Unstructured::new(&buf);
11957        Self::arbitrary(&mut unstructured).unwrap_or_default()
11958    }
11959}
11960impl Default for ESC_INFO_DATA {
11961    fn default() -> Self {
11962        Self::DEFAULT.clone()
11963    }
11964}
11965impl MessageData for ESC_INFO_DATA {
11966    type Message = MavMessage;
11967    const ID: u32 = 290u32;
11968    const NAME: &'static str = "ESC_INFO";
11969    const EXTRA_CRC: u8 = 251u8;
11970    const ENCODED_LEN: usize = 46usize;
11971    fn deser(
11972        _version: MavlinkVersion,
11973        __input: &[u8],
11974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11975        let avail_len = __input.len();
11976        let mut payload_buf = [0; Self::ENCODED_LEN];
11977        let mut buf = if avail_len < Self::ENCODED_LEN {
11978            payload_buf[0..avail_len].copy_from_slice(__input);
11979            Bytes::new(&payload_buf)
11980        } else {
11981            Bytes::new(__input)
11982        };
11983        let mut __struct = Self::default();
11984        __struct.time_usec = buf.get_u64_le();
11985        for v in &mut __struct.error_count {
11986            let val = buf.get_u32_le();
11987            *v = val;
11988        }
11989        __struct.counter = buf.get_u16_le();
11990        for v in &mut __struct.failure_flags {
11991            let val = buf.get_u16_le();
11992            *v = val;
11993        }
11994        for v in &mut __struct.temperature {
11995            let val = buf.get_i16_le();
11996            *v = val;
11997        }
11998        __struct.index = buf.get_u8();
11999        __struct.count = buf.get_u8();
12000        let tmp = buf.get_u8();
12001        __struct.connection_type =
12002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12003                enum_type: "EscConnectionType",
12004                value: tmp as u64,
12005            })?;
12006        __struct.info = buf.get_u8();
12007        Ok(__struct)
12008    }
12009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12010        let mut __tmp = BytesMut::new(bytes);
12011        #[allow(clippy::absurd_extreme_comparisons)]
12012        #[allow(unused_comparisons)]
12013        if __tmp.remaining() < Self::ENCODED_LEN {
12014            panic!(
12015                "buffer is too small (need {} bytes, but got {})",
12016                Self::ENCODED_LEN,
12017                __tmp.remaining(),
12018            )
12019        }
12020        __tmp.put_u64_le(self.time_usec);
12021        for val in &self.error_count {
12022            __tmp.put_u32_le(*val);
12023        }
12024        __tmp.put_u16_le(self.counter);
12025        for val in &self.failure_flags {
12026            __tmp.put_u16_le(*val);
12027        }
12028        for val in &self.temperature {
12029            __tmp.put_i16_le(*val);
12030        }
12031        __tmp.put_u8(self.index);
12032        __tmp.put_u8(self.count);
12033        __tmp.put_u8(self.connection_type as u8);
12034        __tmp.put_u8(self.info);
12035        if matches!(version, MavlinkVersion::V2) {
12036            let len = __tmp.len();
12037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12038        } else {
12039            __tmp.len()
12040        }
12041    }
12042}
12043#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
12044#[doc = ""]
12045#[doc = "ID: 291"]
12046#[derive(Debug, Clone, PartialEq)]
12047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12049#[cfg_attr(feature = "ts", derive(TS))]
12050#[cfg_attr(feature = "ts", ts(export))]
12051pub struct ESC_STATUS_DATA {
12052    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
12053    pub time_usec: u64,
12054    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
12055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12056    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12057    pub rpm: [i32; 4],
12058    #[doc = "Voltage measured from each ESC."]
12059    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12060    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12061    pub voltage: [f32; 4],
12062    #[doc = "Current measured from each ESC."]
12063    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12064    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12065    pub current: [f32; 4],
12066    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
12067    pub index: u8,
12068}
12069impl ESC_STATUS_DATA {
12070    pub const ENCODED_LEN: usize = 57usize;
12071    pub const DEFAULT: Self = Self {
12072        time_usec: 0_u64,
12073        rpm: [0_i32; 4usize],
12074        voltage: [0.0_f32; 4usize],
12075        current: [0.0_f32; 4usize],
12076        index: 0_u8,
12077    };
12078    #[cfg(feature = "arbitrary")]
12079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12080        use arbitrary::{Arbitrary, Unstructured};
12081        let mut buf = [0u8; 1024];
12082        rng.fill_bytes(&mut buf);
12083        let mut unstructured = Unstructured::new(&buf);
12084        Self::arbitrary(&mut unstructured).unwrap_or_default()
12085    }
12086}
12087impl Default for ESC_STATUS_DATA {
12088    fn default() -> Self {
12089        Self::DEFAULT.clone()
12090    }
12091}
12092impl MessageData for ESC_STATUS_DATA {
12093    type Message = MavMessage;
12094    const ID: u32 = 291u32;
12095    const NAME: &'static str = "ESC_STATUS";
12096    const EXTRA_CRC: u8 = 10u8;
12097    const ENCODED_LEN: usize = 57usize;
12098    fn deser(
12099        _version: MavlinkVersion,
12100        __input: &[u8],
12101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12102        let avail_len = __input.len();
12103        let mut payload_buf = [0; Self::ENCODED_LEN];
12104        let mut buf = if avail_len < Self::ENCODED_LEN {
12105            payload_buf[0..avail_len].copy_from_slice(__input);
12106            Bytes::new(&payload_buf)
12107        } else {
12108            Bytes::new(__input)
12109        };
12110        let mut __struct = Self::default();
12111        __struct.time_usec = buf.get_u64_le();
12112        for v in &mut __struct.rpm {
12113            let val = buf.get_i32_le();
12114            *v = val;
12115        }
12116        for v in &mut __struct.voltage {
12117            let val = buf.get_f32_le();
12118            *v = val;
12119        }
12120        for v in &mut __struct.current {
12121            let val = buf.get_f32_le();
12122            *v = val;
12123        }
12124        __struct.index = buf.get_u8();
12125        Ok(__struct)
12126    }
12127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12128        let mut __tmp = BytesMut::new(bytes);
12129        #[allow(clippy::absurd_extreme_comparisons)]
12130        #[allow(unused_comparisons)]
12131        if __tmp.remaining() < Self::ENCODED_LEN {
12132            panic!(
12133                "buffer is too small (need {} bytes, but got {})",
12134                Self::ENCODED_LEN,
12135                __tmp.remaining(),
12136            )
12137        }
12138        __tmp.put_u64_le(self.time_usec);
12139        for val in &self.rpm {
12140            __tmp.put_i32_le(*val);
12141        }
12142        for val in &self.voltage {
12143            __tmp.put_f32_le(*val);
12144        }
12145        for val in &self.current {
12146            __tmp.put_f32_le(*val);
12147        }
12148        __tmp.put_u8(self.index);
12149        if matches!(version, MavlinkVersion::V2) {
12150            let len = __tmp.len();
12151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12152        } else {
12153            __tmp.len()
12154        }
12155    }
12156}
12157#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
12158#[doc = ""]
12159#[doc = "ID: 230"]
12160#[derive(Debug, Clone, PartialEq)]
12161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12163#[cfg_attr(feature = "ts", derive(TS))]
12164#[cfg_attr(feature = "ts", ts(export))]
12165pub struct ESTIMATOR_STATUS_DATA {
12166    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12167    pub time_usec: u64,
12168    #[doc = "Velocity innovation test ratio"]
12169    pub vel_ratio: f32,
12170    #[doc = "Horizontal position innovation test ratio"]
12171    pub pos_horiz_ratio: f32,
12172    #[doc = "Vertical position innovation test ratio"]
12173    pub pos_vert_ratio: f32,
12174    #[doc = "Magnetometer innovation test ratio"]
12175    pub mag_ratio: f32,
12176    #[doc = "Height above terrain innovation test ratio"]
12177    pub hagl_ratio: f32,
12178    #[doc = "True airspeed innovation test ratio"]
12179    pub tas_ratio: f32,
12180    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
12181    pub pos_horiz_accuracy: f32,
12182    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
12183    pub pos_vert_accuracy: f32,
12184    #[doc = "Bitmap indicating which EKF outputs are valid."]
12185    pub flags: EstimatorStatusFlags,
12186}
12187impl ESTIMATOR_STATUS_DATA {
12188    pub const ENCODED_LEN: usize = 42usize;
12189    pub const DEFAULT: Self = Self {
12190        time_usec: 0_u64,
12191        vel_ratio: 0.0_f32,
12192        pos_horiz_ratio: 0.0_f32,
12193        pos_vert_ratio: 0.0_f32,
12194        mag_ratio: 0.0_f32,
12195        hagl_ratio: 0.0_f32,
12196        tas_ratio: 0.0_f32,
12197        pos_horiz_accuracy: 0.0_f32,
12198        pos_vert_accuracy: 0.0_f32,
12199        flags: EstimatorStatusFlags::DEFAULT,
12200    };
12201    #[cfg(feature = "arbitrary")]
12202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12203        use arbitrary::{Arbitrary, Unstructured};
12204        let mut buf = [0u8; 1024];
12205        rng.fill_bytes(&mut buf);
12206        let mut unstructured = Unstructured::new(&buf);
12207        Self::arbitrary(&mut unstructured).unwrap_or_default()
12208    }
12209}
12210impl Default for ESTIMATOR_STATUS_DATA {
12211    fn default() -> Self {
12212        Self::DEFAULT.clone()
12213    }
12214}
12215impl MessageData for ESTIMATOR_STATUS_DATA {
12216    type Message = MavMessage;
12217    const ID: u32 = 230u32;
12218    const NAME: &'static str = "ESTIMATOR_STATUS";
12219    const EXTRA_CRC: u8 = 163u8;
12220    const ENCODED_LEN: usize = 42usize;
12221    fn deser(
12222        _version: MavlinkVersion,
12223        __input: &[u8],
12224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12225        let avail_len = __input.len();
12226        let mut payload_buf = [0; Self::ENCODED_LEN];
12227        let mut buf = if avail_len < Self::ENCODED_LEN {
12228            payload_buf[0..avail_len].copy_from_slice(__input);
12229            Bytes::new(&payload_buf)
12230        } else {
12231            Bytes::new(__input)
12232        };
12233        let mut __struct = Self::default();
12234        __struct.time_usec = buf.get_u64_le();
12235        __struct.vel_ratio = buf.get_f32_le();
12236        __struct.pos_horiz_ratio = buf.get_f32_le();
12237        __struct.pos_vert_ratio = buf.get_f32_le();
12238        __struct.mag_ratio = buf.get_f32_le();
12239        __struct.hagl_ratio = buf.get_f32_le();
12240        __struct.tas_ratio = buf.get_f32_le();
12241        __struct.pos_horiz_accuracy = buf.get_f32_le();
12242        __struct.pos_vert_accuracy = buf.get_f32_le();
12243        let tmp = buf.get_u16_le();
12244        __struct.flags = EstimatorStatusFlags::from_bits(tmp).ok_or(
12245            ::mavlink_core::error::ParserError::InvalidFlag {
12246                flag_type: "EstimatorStatusFlags",
12247                value: tmp as u64,
12248            },
12249        )?;
12250        Ok(__struct)
12251    }
12252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12253        let mut __tmp = BytesMut::new(bytes);
12254        #[allow(clippy::absurd_extreme_comparisons)]
12255        #[allow(unused_comparisons)]
12256        if __tmp.remaining() < Self::ENCODED_LEN {
12257            panic!(
12258                "buffer is too small (need {} bytes, but got {})",
12259                Self::ENCODED_LEN,
12260                __tmp.remaining(),
12261            )
12262        }
12263        __tmp.put_u64_le(self.time_usec);
12264        __tmp.put_f32_le(self.vel_ratio);
12265        __tmp.put_f32_le(self.pos_horiz_ratio);
12266        __tmp.put_f32_le(self.pos_vert_ratio);
12267        __tmp.put_f32_le(self.mag_ratio);
12268        __tmp.put_f32_le(self.hagl_ratio);
12269        __tmp.put_f32_le(self.tas_ratio);
12270        __tmp.put_f32_le(self.pos_horiz_accuracy);
12271        __tmp.put_f32_le(self.pos_vert_accuracy);
12272        __tmp.put_u16_le(self.flags.bits());
12273        if matches!(version, MavlinkVersion::V2) {
12274            let len = __tmp.len();
12275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12276        } else {
12277            __tmp.len()
12278        }
12279    }
12280}
12281#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12282#[doc = ""]
12283#[doc = "ID: 410"]
12284#[derive(Debug, Clone, PartialEq)]
12285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12287#[cfg_attr(feature = "ts", derive(TS))]
12288#[cfg_attr(feature = "ts", ts(export))]
12289pub struct EVENT_DATA {
12290    #[doc = "Event ID (as defined in the component metadata)"]
12291    pub id: u32,
12292    #[doc = "Timestamp (time since system boot when the event happened)."]
12293    pub event_time_boot_ms: u32,
12294    #[doc = "Sequence number."]
12295    pub sequence: u16,
12296    #[doc = "Component ID"]
12297    pub destination_component: u8,
12298    #[doc = "System ID"]
12299    pub destination_system: u8,
12300    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12301    pub log_levels: u8,
12302    #[doc = "Arguments (depend on event ID)."]
12303    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12304    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12305    pub arguments: [u8; 40],
12306}
12307impl EVENT_DATA {
12308    pub const ENCODED_LEN: usize = 53usize;
12309    pub const DEFAULT: Self = Self {
12310        id: 0_u32,
12311        event_time_boot_ms: 0_u32,
12312        sequence: 0_u16,
12313        destination_component: 0_u8,
12314        destination_system: 0_u8,
12315        log_levels: 0_u8,
12316        arguments: [0_u8; 40usize],
12317    };
12318    #[cfg(feature = "arbitrary")]
12319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12320        use arbitrary::{Arbitrary, Unstructured};
12321        let mut buf = [0u8; 1024];
12322        rng.fill_bytes(&mut buf);
12323        let mut unstructured = Unstructured::new(&buf);
12324        Self::arbitrary(&mut unstructured).unwrap_or_default()
12325    }
12326}
12327impl Default for EVENT_DATA {
12328    fn default() -> Self {
12329        Self::DEFAULT.clone()
12330    }
12331}
12332impl MessageData for EVENT_DATA {
12333    type Message = MavMessage;
12334    const ID: u32 = 410u32;
12335    const NAME: &'static str = "EVENT";
12336    const EXTRA_CRC: u8 = 160u8;
12337    const ENCODED_LEN: usize = 53usize;
12338    fn deser(
12339        _version: MavlinkVersion,
12340        __input: &[u8],
12341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12342        let avail_len = __input.len();
12343        let mut payload_buf = [0; Self::ENCODED_LEN];
12344        let mut buf = if avail_len < Self::ENCODED_LEN {
12345            payload_buf[0..avail_len].copy_from_slice(__input);
12346            Bytes::new(&payload_buf)
12347        } else {
12348            Bytes::new(__input)
12349        };
12350        let mut __struct = Self::default();
12351        __struct.id = buf.get_u32_le();
12352        __struct.event_time_boot_ms = buf.get_u32_le();
12353        __struct.sequence = buf.get_u16_le();
12354        __struct.destination_component = buf.get_u8();
12355        __struct.destination_system = buf.get_u8();
12356        __struct.log_levels = buf.get_u8();
12357        for v in &mut __struct.arguments {
12358            let val = buf.get_u8();
12359            *v = val;
12360        }
12361        Ok(__struct)
12362    }
12363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12364        let mut __tmp = BytesMut::new(bytes);
12365        #[allow(clippy::absurd_extreme_comparisons)]
12366        #[allow(unused_comparisons)]
12367        if __tmp.remaining() < Self::ENCODED_LEN {
12368            panic!(
12369                "buffer is too small (need {} bytes, but got {})",
12370                Self::ENCODED_LEN,
12371                __tmp.remaining(),
12372            )
12373        }
12374        __tmp.put_u32_le(self.id);
12375        __tmp.put_u32_le(self.event_time_boot_ms);
12376        __tmp.put_u16_le(self.sequence);
12377        __tmp.put_u8(self.destination_component);
12378        __tmp.put_u8(self.destination_system);
12379        __tmp.put_u8(self.log_levels);
12380        for val in &self.arguments {
12381            __tmp.put_u8(*val);
12382        }
12383        if matches!(version, MavlinkVersion::V2) {
12384            let len = __tmp.len();
12385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12386        } else {
12387            __tmp.len()
12388        }
12389    }
12390}
12391#[doc = "Provides state for additional features."]
12392#[doc = ""]
12393#[doc = "ID: 245"]
12394#[derive(Debug, Clone, PartialEq)]
12395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12397#[cfg_attr(feature = "ts", derive(TS))]
12398#[cfg_attr(feature = "ts", ts(export))]
12399pub struct EXTENDED_SYS_STATE_DATA {
12400    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12401    pub vtol_state: MavVtolState,
12402    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12403    pub landed_state: MavLandedState,
12404}
12405impl EXTENDED_SYS_STATE_DATA {
12406    pub const ENCODED_LEN: usize = 2usize;
12407    pub const DEFAULT: Self = Self {
12408        vtol_state: MavVtolState::DEFAULT,
12409        landed_state: MavLandedState::DEFAULT,
12410    };
12411    #[cfg(feature = "arbitrary")]
12412    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12413        use arbitrary::{Arbitrary, Unstructured};
12414        let mut buf = [0u8; 1024];
12415        rng.fill_bytes(&mut buf);
12416        let mut unstructured = Unstructured::new(&buf);
12417        Self::arbitrary(&mut unstructured).unwrap_or_default()
12418    }
12419}
12420impl Default for EXTENDED_SYS_STATE_DATA {
12421    fn default() -> Self {
12422        Self::DEFAULT.clone()
12423    }
12424}
12425impl MessageData for EXTENDED_SYS_STATE_DATA {
12426    type Message = MavMessage;
12427    const ID: u32 = 245u32;
12428    const NAME: &'static str = "EXTENDED_SYS_STATE";
12429    const EXTRA_CRC: u8 = 130u8;
12430    const ENCODED_LEN: usize = 2usize;
12431    fn deser(
12432        _version: MavlinkVersion,
12433        __input: &[u8],
12434    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12435        let avail_len = __input.len();
12436        let mut payload_buf = [0; Self::ENCODED_LEN];
12437        let mut buf = if avail_len < Self::ENCODED_LEN {
12438            payload_buf[0..avail_len].copy_from_slice(__input);
12439            Bytes::new(&payload_buf)
12440        } else {
12441            Bytes::new(__input)
12442        };
12443        let mut __struct = Self::default();
12444        let tmp = buf.get_u8();
12445        __struct.vtol_state =
12446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12447                enum_type: "MavVtolState",
12448                value: tmp as u64,
12449            })?;
12450        let tmp = buf.get_u8();
12451        __struct.landed_state =
12452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12453                enum_type: "MavLandedState",
12454                value: tmp as u64,
12455            })?;
12456        Ok(__struct)
12457    }
12458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12459        let mut __tmp = BytesMut::new(bytes);
12460        #[allow(clippy::absurd_extreme_comparisons)]
12461        #[allow(unused_comparisons)]
12462        if __tmp.remaining() < Self::ENCODED_LEN {
12463            panic!(
12464                "buffer is too small (need {} bytes, but got {})",
12465                Self::ENCODED_LEN,
12466                __tmp.remaining(),
12467            )
12468        }
12469        __tmp.put_u8(self.vtol_state as u8);
12470        __tmp.put_u8(self.landed_state as u8);
12471        if matches!(version, MavlinkVersion::V2) {
12472            let len = __tmp.len();
12473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12474        } else {
12475            __tmp.len()
12476        }
12477    }
12478}
12479#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12480#[doc = ""]
12481#[doc = "ID: 162"]
12482#[derive(Debug, Clone, PartialEq)]
12483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12485#[cfg_attr(feature = "ts", derive(TS))]
12486#[cfg_attr(feature = "ts", ts(export))]
12487pub struct FENCE_STATUS_DATA {
12488    #[doc = "Time (since boot) of last breach."]
12489    pub breach_time: u32,
12490    #[doc = "Number of fence breaches."]
12491    pub breach_count: u16,
12492    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12493    pub breach_status: u8,
12494    #[doc = "Last breach type."]
12495    pub breach_type: FenceBreach,
12496    #[doc = "Active action to prevent fence breach"]
12497    #[cfg_attr(feature = "serde", serde(default))]
12498    pub breach_mitigation: FenceMitigate,
12499}
12500impl FENCE_STATUS_DATA {
12501    pub const ENCODED_LEN: usize = 9usize;
12502    pub const DEFAULT: Self = Self {
12503        breach_time: 0_u32,
12504        breach_count: 0_u16,
12505        breach_status: 0_u8,
12506        breach_type: FenceBreach::DEFAULT,
12507        breach_mitigation: FenceMitigate::DEFAULT,
12508    };
12509    #[cfg(feature = "arbitrary")]
12510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12511        use arbitrary::{Arbitrary, Unstructured};
12512        let mut buf = [0u8; 1024];
12513        rng.fill_bytes(&mut buf);
12514        let mut unstructured = Unstructured::new(&buf);
12515        Self::arbitrary(&mut unstructured).unwrap_or_default()
12516    }
12517}
12518impl Default for FENCE_STATUS_DATA {
12519    fn default() -> Self {
12520        Self::DEFAULT.clone()
12521    }
12522}
12523impl MessageData for FENCE_STATUS_DATA {
12524    type Message = MavMessage;
12525    const ID: u32 = 162u32;
12526    const NAME: &'static str = "FENCE_STATUS";
12527    const EXTRA_CRC: u8 = 189u8;
12528    const ENCODED_LEN: usize = 9usize;
12529    fn deser(
12530        _version: MavlinkVersion,
12531        __input: &[u8],
12532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12533        let avail_len = __input.len();
12534        let mut payload_buf = [0; Self::ENCODED_LEN];
12535        let mut buf = if avail_len < Self::ENCODED_LEN {
12536            payload_buf[0..avail_len].copy_from_slice(__input);
12537            Bytes::new(&payload_buf)
12538        } else {
12539            Bytes::new(__input)
12540        };
12541        let mut __struct = Self::default();
12542        __struct.breach_time = buf.get_u32_le();
12543        __struct.breach_count = buf.get_u16_le();
12544        __struct.breach_status = buf.get_u8();
12545        let tmp = buf.get_u8();
12546        __struct.breach_type =
12547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12548                enum_type: "FenceBreach",
12549                value: tmp as u64,
12550            })?;
12551        let tmp = buf.get_u8();
12552        __struct.breach_mitigation =
12553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12554                enum_type: "FenceMitigate",
12555                value: tmp as u64,
12556            })?;
12557        Ok(__struct)
12558    }
12559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12560        let mut __tmp = BytesMut::new(bytes);
12561        #[allow(clippy::absurd_extreme_comparisons)]
12562        #[allow(unused_comparisons)]
12563        if __tmp.remaining() < Self::ENCODED_LEN {
12564            panic!(
12565                "buffer is too small (need {} bytes, but got {})",
12566                Self::ENCODED_LEN,
12567                __tmp.remaining(),
12568            )
12569        }
12570        __tmp.put_u32_le(self.breach_time);
12571        __tmp.put_u16_le(self.breach_count);
12572        __tmp.put_u8(self.breach_status);
12573        __tmp.put_u8(self.breach_type as u8);
12574        if matches!(version, MavlinkVersion::V2) {
12575            __tmp.put_u8(self.breach_mitigation as u8);
12576            let len = __tmp.len();
12577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12578        } else {
12579            __tmp.len()
12580        }
12581    }
12582}
12583#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12584#[doc = ""]
12585#[doc = "ID: 110"]
12586#[derive(Debug, Clone, PartialEq)]
12587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12589#[cfg_attr(feature = "ts", derive(TS))]
12590#[cfg_attr(feature = "ts", ts(export))]
12591pub struct FILE_TRANSFER_PROTOCOL_DATA {
12592    #[doc = "Network ID (0 for broadcast)"]
12593    pub target_network: u8,
12594    #[doc = "System ID (0 for broadcast)"]
12595    pub target_system: u8,
12596    #[doc = "Component ID (0 for broadcast)"]
12597    pub target_component: u8,
12598    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12600    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12601    pub payload: [u8; 251],
12602}
12603impl FILE_TRANSFER_PROTOCOL_DATA {
12604    pub const ENCODED_LEN: usize = 254usize;
12605    pub const DEFAULT: Self = Self {
12606        target_network: 0_u8,
12607        target_system: 0_u8,
12608        target_component: 0_u8,
12609        payload: [0_u8; 251usize],
12610    };
12611    #[cfg(feature = "arbitrary")]
12612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12613        use arbitrary::{Arbitrary, Unstructured};
12614        let mut buf = [0u8; 1024];
12615        rng.fill_bytes(&mut buf);
12616        let mut unstructured = Unstructured::new(&buf);
12617        Self::arbitrary(&mut unstructured).unwrap_or_default()
12618    }
12619}
12620impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12621    fn default() -> Self {
12622        Self::DEFAULT.clone()
12623    }
12624}
12625impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12626    type Message = MavMessage;
12627    const ID: u32 = 110u32;
12628    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12629    const EXTRA_CRC: u8 = 84u8;
12630    const ENCODED_LEN: usize = 254usize;
12631    fn deser(
12632        _version: MavlinkVersion,
12633        __input: &[u8],
12634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12635        let avail_len = __input.len();
12636        let mut payload_buf = [0; Self::ENCODED_LEN];
12637        let mut buf = if avail_len < Self::ENCODED_LEN {
12638            payload_buf[0..avail_len].copy_from_slice(__input);
12639            Bytes::new(&payload_buf)
12640        } else {
12641            Bytes::new(__input)
12642        };
12643        let mut __struct = Self::default();
12644        __struct.target_network = buf.get_u8();
12645        __struct.target_system = buf.get_u8();
12646        __struct.target_component = buf.get_u8();
12647        for v in &mut __struct.payload {
12648            let val = buf.get_u8();
12649            *v = val;
12650        }
12651        Ok(__struct)
12652    }
12653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12654        let mut __tmp = BytesMut::new(bytes);
12655        #[allow(clippy::absurd_extreme_comparisons)]
12656        #[allow(unused_comparisons)]
12657        if __tmp.remaining() < Self::ENCODED_LEN {
12658            panic!(
12659                "buffer is too small (need {} bytes, but got {})",
12660                Self::ENCODED_LEN,
12661                __tmp.remaining(),
12662            )
12663        }
12664        __tmp.put_u8(self.target_network);
12665        __tmp.put_u8(self.target_system);
12666        __tmp.put_u8(self.target_component);
12667        for val in &self.payload {
12668            __tmp.put_u8(*val);
12669        }
12670        if matches!(version, MavlinkVersion::V2) {
12671            let len = __tmp.len();
12672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12673        } else {
12674            __tmp.len()
12675        }
12676    }
12677}
12678#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12679#[doc = ""]
12680#[doc = "ID: 264"]
12681#[derive(Debug, Clone, PartialEq)]
12682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12684#[cfg_attr(feature = "ts", derive(TS))]
12685#[cfg_attr(feature = "ts", ts(export))]
12686pub struct FLIGHT_INFORMATION_DATA {
12687    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12688    pub arming_time_utc: u64,
12689    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12690    pub takeoff_time_utc: u64,
12691    #[doc = "Flight number. Note, field is misnamed UUID."]
12692    pub flight_uuid: u64,
12693    #[doc = "Timestamp (time since system boot)."]
12694    pub time_boot_ms: u32,
12695    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12697    pub landing_time: u32,
12698}
12699impl FLIGHT_INFORMATION_DATA {
12700    pub const ENCODED_LEN: usize = 32usize;
12701    pub const DEFAULT: Self = Self {
12702        arming_time_utc: 0_u64,
12703        takeoff_time_utc: 0_u64,
12704        flight_uuid: 0_u64,
12705        time_boot_ms: 0_u32,
12706        landing_time: 0_u32,
12707    };
12708    #[cfg(feature = "arbitrary")]
12709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12710        use arbitrary::{Arbitrary, Unstructured};
12711        let mut buf = [0u8; 1024];
12712        rng.fill_bytes(&mut buf);
12713        let mut unstructured = Unstructured::new(&buf);
12714        Self::arbitrary(&mut unstructured).unwrap_or_default()
12715    }
12716}
12717impl Default for FLIGHT_INFORMATION_DATA {
12718    fn default() -> Self {
12719        Self::DEFAULT.clone()
12720    }
12721}
12722impl MessageData for FLIGHT_INFORMATION_DATA {
12723    type Message = MavMessage;
12724    const ID: u32 = 264u32;
12725    const NAME: &'static str = "FLIGHT_INFORMATION";
12726    const EXTRA_CRC: u8 = 49u8;
12727    const ENCODED_LEN: usize = 32usize;
12728    fn deser(
12729        _version: MavlinkVersion,
12730        __input: &[u8],
12731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12732        let avail_len = __input.len();
12733        let mut payload_buf = [0; Self::ENCODED_LEN];
12734        let mut buf = if avail_len < Self::ENCODED_LEN {
12735            payload_buf[0..avail_len].copy_from_slice(__input);
12736            Bytes::new(&payload_buf)
12737        } else {
12738            Bytes::new(__input)
12739        };
12740        let mut __struct = Self::default();
12741        __struct.arming_time_utc = buf.get_u64_le();
12742        __struct.takeoff_time_utc = buf.get_u64_le();
12743        __struct.flight_uuid = buf.get_u64_le();
12744        __struct.time_boot_ms = buf.get_u32_le();
12745        __struct.landing_time = buf.get_u32_le();
12746        Ok(__struct)
12747    }
12748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12749        let mut __tmp = BytesMut::new(bytes);
12750        #[allow(clippy::absurd_extreme_comparisons)]
12751        #[allow(unused_comparisons)]
12752        if __tmp.remaining() < Self::ENCODED_LEN {
12753            panic!(
12754                "buffer is too small (need {} bytes, but got {})",
12755                Self::ENCODED_LEN,
12756                __tmp.remaining(),
12757            )
12758        }
12759        __tmp.put_u64_le(self.arming_time_utc);
12760        __tmp.put_u64_le(self.takeoff_time_utc);
12761        __tmp.put_u64_le(self.flight_uuid);
12762        __tmp.put_u32_le(self.time_boot_ms);
12763        if matches!(version, MavlinkVersion::V2) {
12764            __tmp.put_u32_le(self.landing_time);
12765            let len = __tmp.len();
12766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12767        } else {
12768            __tmp.len()
12769        }
12770    }
12771}
12772#[doc = "Current motion information from a designated system."]
12773#[doc = ""]
12774#[doc = "ID: 144"]
12775#[derive(Debug, Clone, PartialEq)]
12776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12777#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12778#[cfg_attr(feature = "ts", derive(TS))]
12779#[cfg_attr(feature = "ts", ts(export))]
12780pub struct FOLLOW_TARGET_DATA {
12781    #[doc = "Timestamp (time since system boot)."]
12782    pub timestamp: u64,
12783    #[doc = "button states or switches of a tracker device"]
12784    pub custom_state: u64,
12785    #[doc = "Latitude (WGS84)"]
12786    pub lat: i32,
12787    #[doc = "Longitude (WGS84)"]
12788    pub lon: i32,
12789    #[doc = "Altitude (MSL)"]
12790    pub alt: f32,
12791    #[doc = "target velocity (0,0,0) for unknown"]
12792    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12793    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12794    pub vel: [f32; 3],
12795    #[doc = "linear target acceleration (0,0,0) for unknown"]
12796    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12797    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12798    pub acc: [f32; 3],
12799    #[doc = "(0 0 0 0 for unknown)"]
12800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12801    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12802    pub attitude_q: [f32; 4],
12803    #[doc = "(0 0 0 for unknown)"]
12804    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12805    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12806    pub rates: [f32; 3],
12807    #[doc = "eph epv"]
12808    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12809    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12810    pub position_cov: [f32; 3],
12811    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12812    pub est_capabilities: u8,
12813}
12814impl FOLLOW_TARGET_DATA {
12815    pub const ENCODED_LEN: usize = 93usize;
12816    pub const DEFAULT: Self = Self {
12817        timestamp: 0_u64,
12818        custom_state: 0_u64,
12819        lat: 0_i32,
12820        lon: 0_i32,
12821        alt: 0.0_f32,
12822        vel: [0.0_f32; 3usize],
12823        acc: [0.0_f32; 3usize],
12824        attitude_q: [0.0_f32; 4usize],
12825        rates: [0.0_f32; 3usize],
12826        position_cov: [0.0_f32; 3usize],
12827        est_capabilities: 0_u8,
12828    };
12829    #[cfg(feature = "arbitrary")]
12830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12831        use arbitrary::{Arbitrary, Unstructured};
12832        let mut buf = [0u8; 1024];
12833        rng.fill_bytes(&mut buf);
12834        let mut unstructured = Unstructured::new(&buf);
12835        Self::arbitrary(&mut unstructured).unwrap_or_default()
12836    }
12837}
12838impl Default for FOLLOW_TARGET_DATA {
12839    fn default() -> Self {
12840        Self::DEFAULT.clone()
12841    }
12842}
12843impl MessageData for FOLLOW_TARGET_DATA {
12844    type Message = MavMessage;
12845    const ID: u32 = 144u32;
12846    const NAME: &'static str = "FOLLOW_TARGET";
12847    const EXTRA_CRC: u8 = 127u8;
12848    const ENCODED_LEN: usize = 93usize;
12849    fn deser(
12850        _version: MavlinkVersion,
12851        __input: &[u8],
12852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12853        let avail_len = __input.len();
12854        let mut payload_buf = [0; Self::ENCODED_LEN];
12855        let mut buf = if avail_len < Self::ENCODED_LEN {
12856            payload_buf[0..avail_len].copy_from_slice(__input);
12857            Bytes::new(&payload_buf)
12858        } else {
12859            Bytes::new(__input)
12860        };
12861        let mut __struct = Self::default();
12862        __struct.timestamp = buf.get_u64_le();
12863        __struct.custom_state = buf.get_u64_le();
12864        __struct.lat = buf.get_i32_le();
12865        __struct.lon = buf.get_i32_le();
12866        __struct.alt = buf.get_f32_le();
12867        for v in &mut __struct.vel {
12868            let val = buf.get_f32_le();
12869            *v = val;
12870        }
12871        for v in &mut __struct.acc {
12872            let val = buf.get_f32_le();
12873            *v = val;
12874        }
12875        for v in &mut __struct.attitude_q {
12876            let val = buf.get_f32_le();
12877            *v = val;
12878        }
12879        for v in &mut __struct.rates {
12880            let val = buf.get_f32_le();
12881            *v = val;
12882        }
12883        for v in &mut __struct.position_cov {
12884            let val = buf.get_f32_le();
12885            *v = val;
12886        }
12887        __struct.est_capabilities = buf.get_u8();
12888        Ok(__struct)
12889    }
12890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12891        let mut __tmp = BytesMut::new(bytes);
12892        #[allow(clippy::absurd_extreme_comparisons)]
12893        #[allow(unused_comparisons)]
12894        if __tmp.remaining() < Self::ENCODED_LEN {
12895            panic!(
12896                "buffer is too small (need {} bytes, but got {})",
12897                Self::ENCODED_LEN,
12898                __tmp.remaining(),
12899            )
12900        }
12901        __tmp.put_u64_le(self.timestamp);
12902        __tmp.put_u64_le(self.custom_state);
12903        __tmp.put_i32_le(self.lat);
12904        __tmp.put_i32_le(self.lon);
12905        __tmp.put_f32_le(self.alt);
12906        for val in &self.vel {
12907            __tmp.put_f32_le(*val);
12908        }
12909        for val in &self.acc {
12910            __tmp.put_f32_le(*val);
12911        }
12912        for val in &self.attitude_q {
12913            __tmp.put_f32_le(*val);
12914        }
12915        for val in &self.rates {
12916            __tmp.put_f32_le(*val);
12917        }
12918        for val in &self.position_cov {
12919            __tmp.put_f32_le(*val);
12920        }
12921        __tmp.put_u8(self.est_capabilities);
12922        if matches!(version, MavlinkVersion::V2) {
12923            let len = __tmp.len();
12924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12925        } else {
12926            __tmp.len()
12927        }
12928    }
12929}
12930#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12931#[doc = ""]
12932#[doc = "ID: 371"]
12933#[derive(Debug, Clone, PartialEq)]
12934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12936#[cfg_attr(feature = "ts", derive(TS))]
12937#[cfg_attr(feature = "ts", ts(export))]
12938pub struct FUEL_STATUS_DATA {
12939    #[doc = "Capacity when full. Must be provided."]
12940    pub maximum_fuel: f32,
12941    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12942    pub consumed_fuel: f32,
12943    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12944    pub remaining_fuel: f32,
12945    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12946    pub flow_rate: f32,
12947    #[doc = "Fuel temperature. NaN: field not provided."]
12948    pub temperature: f32,
12949    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12950    pub fuel_type: MavFuelType,
12951    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12952    pub id: u8,
12953    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12954    pub percent_remaining: u8,
12955}
12956impl FUEL_STATUS_DATA {
12957    pub const ENCODED_LEN: usize = 26usize;
12958    pub const DEFAULT: Self = Self {
12959        maximum_fuel: 0.0_f32,
12960        consumed_fuel: 0.0_f32,
12961        remaining_fuel: 0.0_f32,
12962        flow_rate: 0.0_f32,
12963        temperature: 0.0_f32,
12964        fuel_type: MavFuelType::DEFAULT,
12965        id: 0_u8,
12966        percent_remaining: 0_u8,
12967    };
12968    #[cfg(feature = "arbitrary")]
12969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12970        use arbitrary::{Arbitrary, Unstructured};
12971        let mut buf = [0u8; 1024];
12972        rng.fill_bytes(&mut buf);
12973        let mut unstructured = Unstructured::new(&buf);
12974        Self::arbitrary(&mut unstructured).unwrap_or_default()
12975    }
12976}
12977impl Default for FUEL_STATUS_DATA {
12978    fn default() -> Self {
12979        Self::DEFAULT.clone()
12980    }
12981}
12982impl MessageData for FUEL_STATUS_DATA {
12983    type Message = MavMessage;
12984    const ID: u32 = 371u32;
12985    const NAME: &'static str = "FUEL_STATUS";
12986    const EXTRA_CRC: u8 = 10u8;
12987    const ENCODED_LEN: usize = 26usize;
12988    fn deser(
12989        _version: MavlinkVersion,
12990        __input: &[u8],
12991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12992        let avail_len = __input.len();
12993        let mut payload_buf = [0; Self::ENCODED_LEN];
12994        let mut buf = if avail_len < Self::ENCODED_LEN {
12995            payload_buf[0..avail_len].copy_from_slice(__input);
12996            Bytes::new(&payload_buf)
12997        } else {
12998            Bytes::new(__input)
12999        };
13000        let mut __struct = Self::default();
13001        __struct.maximum_fuel = buf.get_f32_le();
13002        __struct.consumed_fuel = buf.get_f32_le();
13003        __struct.remaining_fuel = buf.get_f32_le();
13004        __struct.flow_rate = buf.get_f32_le();
13005        __struct.temperature = buf.get_f32_le();
13006        let tmp = buf.get_u32_le();
13007        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
13008            ::mavlink_core::error::ParserError::InvalidEnum {
13009                enum_type: "MavFuelType",
13010                value: tmp as u64,
13011            },
13012        )?;
13013        __struct.id = buf.get_u8();
13014        __struct.percent_remaining = buf.get_u8();
13015        Ok(__struct)
13016    }
13017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13018        let mut __tmp = BytesMut::new(bytes);
13019        #[allow(clippy::absurd_extreme_comparisons)]
13020        #[allow(unused_comparisons)]
13021        if __tmp.remaining() < Self::ENCODED_LEN {
13022            panic!(
13023                "buffer is too small (need {} bytes, but got {})",
13024                Self::ENCODED_LEN,
13025                __tmp.remaining(),
13026            )
13027        }
13028        __tmp.put_f32_le(self.maximum_fuel);
13029        __tmp.put_f32_le(self.consumed_fuel);
13030        __tmp.put_f32_le(self.remaining_fuel);
13031        __tmp.put_f32_le(self.flow_rate);
13032        __tmp.put_f32_le(self.temperature);
13033        __tmp.put_u32_le(self.fuel_type as u32);
13034        __tmp.put_u8(self.id);
13035        __tmp.put_u8(self.percent_remaining);
13036        if matches!(version, MavlinkVersion::V2) {
13037            let len = __tmp.len();
13038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13039        } else {
13040            __tmp.len()
13041        }
13042    }
13043}
13044#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
13045#[doc = ""]
13046#[doc = "ID: 8011"]
13047#[derive(Debug, Clone, PartialEq)]
13048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13050#[cfg_attr(feature = "ts", derive(TS))]
13051#[cfg_attr(feature = "ts", ts(export))]
13052pub struct FW_SOARING_DATA_DATA {
13053    #[doc = "Timestamp"]
13054    pub timestamp: u64,
13055    #[doc = "Timestamp since last mode change"]
13056    pub timestampModeChanged: u64,
13057    #[doc = "Thermal core updraft strength"]
13058    pub xW: f32,
13059    #[doc = "Thermal radius"]
13060    pub xR: f32,
13061    #[doc = "Thermal center latitude"]
13062    pub xLat: f32,
13063    #[doc = "Thermal center longitude"]
13064    pub xLon: f32,
13065    #[doc = "Variance W"]
13066    pub VarW: f32,
13067    #[doc = "Variance R"]
13068    pub VarR: f32,
13069    #[doc = "Variance Lat"]
13070    pub VarLat: f32,
13071    #[doc = "Variance Lon"]
13072    pub VarLon: f32,
13073    #[doc = "Suggested loiter radius"]
13074    pub LoiterRadius: f32,
13075    #[doc = "Suggested loiter direction"]
13076    pub LoiterDirection: f32,
13077    #[doc = "Distance to soar point"]
13078    pub DistToSoarPoint: f32,
13079    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
13080    pub vSinkExp: f32,
13081    #[doc = "Measurement / updraft speed at current/local airplane position"]
13082    pub z1_LocalUpdraftSpeed: f32,
13083    #[doc = "Measurement / roll angle tracking error"]
13084    pub z2_DeltaRoll: f32,
13085    #[doc = "Expected measurement 1"]
13086    pub z1_exp: f32,
13087    #[doc = "Expected measurement 2"]
13088    pub z2_exp: f32,
13089    #[doc = "Thermal drift (from estimator prediction step only)"]
13090    pub ThermalGSNorth: f32,
13091    #[doc = "Thermal drift (from estimator prediction step only)"]
13092    pub ThermalGSEast: f32,
13093    #[doc = "Total specific energy change (filtered)"]
13094    pub TSE_dot: f32,
13095    #[doc = "Debug variable 1"]
13096    pub DebugVar1: f32,
13097    #[doc = "Debug variable 2"]
13098    pub DebugVar2: f32,
13099    #[doc = "Control Mode [-]"]
13100    pub ControlMode: u8,
13101    #[doc = "Data valid [-]"]
13102    pub valid: u8,
13103}
13104impl FW_SOARING_DATA_DATA {
13105    pub const ENCODED_LEN: usize = 102usize;
13106    pub const DEFAULT: Self = Self {
13107        timestamp: 0_u64,
13108        timestampModeChanged: 0_u64,
13109        xW: 0.0_f32,
13110        xR: 0.0_f32,
13111        xLat: 0.0_f32,
13112        xLon: 0.0_f32,
13113        VarW: 0.0_f32,
13114        VarR: 0.0_f32,
13115        VarLat: 0.0_f32,
13116        VarLon: 0.0_f32,
13117        LoiterRadius: 0.0_f32,
13118        LoiterDirection: 0.0_f32,
13119        DistToSoarPoint: 0.0_f32,
13120        vSinkExp: 0.0_f32,
13121        z1_LocalUpdraftSpeed: 0.0_f32,
13122        z2_DeltaRoll: 0.0_f32,
13123        z1_exp: 0.0_f32,
13124        z2_exp: 0.0_f32,
13125        ThermalGSNorth: 0.0_f32,
13126        ThermalGSEast: 0.0_f32,
13127        TSE_dot: 0.0_f32,
13128        DebugVar1: 0.0_f32,
13129        DebugVar2: 0.0_f32,
13130        ControlMode: 0_u8,
13131        valid: 0_u8,
13132    };
13133    #[cfg(feature = "arbitrary")]
13134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13135        use arbitrary::{Arbitrary, Unstructured};
13136        let mut buf = [0u8; 1024];
13137        rng.fill_bytes(&mut buf);
13138        let mut unstructured = Unstructured::new(&buf);
13139        Self::arbitrary(&mut unstructured).unwrap_or_default()
13140    }
13141}
13142impl Default for FW_SOARING_DATA_DATA {
13143    fn default() -> Self {
13144        Self::DEFAULT.clone()
13145    }
13146}
13147impl MessageData for FW_SOARING_DATA_DATA {
13148    type Message = MavMessage;
13149    const ID: u32 = 8011u32;
13150    const NAME: &'static str = "FW_SOARING_DATA";
13151    const EXTRA_CRC: u8 = 20u8;
13152    const ENCODED_LEN: usize = 102usize;
13153    fn deser(
13154        _version: MavlinkVersion,
13155        __input: &[u8],
13156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13157        let avail_len = __input.len();
13158        let mut payload_buf = [0; Self::ENCODED_LEN];
13159        let mut buf = if avail_len < Self::ENCODED_LEN {
13160            payload_buf[0..avail_len].copy_from_slice(__input);
13161            Bytes::new(&payload_buf)
13162        } else {
13163            Bytes::new(__input)
13164        };
13165        let mut __struct = Self::default();
13166        __struct.timestamp = buf.get_u64_le();
13167        __struct.timestampModeChanged = buf.get_u64_le();
13168        __struct.xW = buf.get_f32_le();
13169        __struct.xR = buf.get_f32_le();
13170        __struct.xLat = buf.get_f32_le();
13171        __struct.xLon = buf.get_f32_le();
13172        __struct.VarW = buf.get_f32_le();
13173        __struct.VarR = buf.get_f32_le();
13174        __struct.VarLat = buf.get_f32_le();
13175        __struct.VarLon = buf.get_f32_le();
13176        __struct.LoiterRadius = buf.get_f32_le();
13177        __struct.LoiterDirection = buf.get_f32_le();
13178        __struct.DistToSoarPoint = buf.get_f32_le();
13179        __struct.vSinkExp = buf.get_f32_le();
13180        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le();
13181        __struct.z2_DeltaRoll = buf.get_f32_le();
13182        __struct.z1_exp = buf.get_f32_le();
13183        __struct.z2_exp = buf.get_f32_le();
13184        __struct.ThermalGSNorth = buf.get_f32_le();
13185        __struct.ThermalGSEast = buf.get_f32_le();
13186        __struct.TSE_dot = buf.get_f32_le();
13187        __struct.DebugVar1 = buf.get_f32_le();
13188        __struct.DebugVar2 = buf.get_f32_le();
13189        __struct.ControlMode = buf.get_u8();
13190        __struct.valid = buf.get_u8();
13191        Ok(__struct)
13192    }
13193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13194        let mut __tmp = BytesMut::new(bytes);
13195        #[allow(clippy::absurd_extreme_comparisons)]
13196        #[allow(unused_comparisons)]
13197        if __tmp.remaining() < Self::ENCODED_LEN {
13198            panic!(
13199                "buffer is too small (need {} bytes, but got {})",
13200                Self::ENCODED_LEN,
13201                __tmp.remaining(),
13202            )
13203        }
13204        __tmp.put_u64_le(self.timestamp);
13205        __tmp.put_u64_le(self.timestampModeChanged);
13206        __tmp.put_f32_le(self.xW);
13207        __tmp.put_f32_le(self.xR);
13208        __tmp.put_f32_le(self.xLat);
13209        __tmp.put_f32_le(self.xLon);
13210        __tmp.put_f32_le(self.VarW);
13211        __tmp.put_f32_le(self.VarR);
13212        __tmp.put_f32_le(self.VarLat);
13213        __tmp.put_f32_le(self.VarLon);
13214        __tmp.put_f32_le(self.LoiterRadius);
13215        __tmp.put_f32_le(self.LoiterDirection);
13216        __tmp.put_f32_le(self.DistToSoarPoint);
13217        __tmp.put_f32_le(self.vSinkExp);
13218        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
13219        __tmp.put_f32_le(self.z2_DeltaRoll);
13220        __tmp.put_f32_le(self.z1_exp);
13221        __tmp.put_f32_le(self.z2_exp);
13222        __tmp.put_f32_le(self.ThermalGSNorth);
13223        __tmp.put_f32_le(self.ThermalGSEast);
13224        __tmp.put_f32_le(self.TSE_dot);
13225        __tmp.put_f32_le(self.DebugVar1);
13226        __tmp.put_f32_le(self.DebugVar2);
13227        __tmp.put_u8(self.ControlMode);
13228        __tmp.put_u8(self.valid);
13229        if matches!(version, MavlinkVersion::V2) {
13230            let len = __tmp.len();
13231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13232        } else {
13233            __tmp.len()
13234        }
13235    }
13236}
13237#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13238#[doc = ""]
13239#[doc = "ID: 373"]
13240#[derive(Debug, Clone, PartialEq)]
13241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13243#[cfg_attr(feature = "ts", derive(TS))]
13244#[cfg_attr(feature = "ts", ts(export))]
13245pub struct GENERATOR_STATUS_DATA {
13246    #[doc = "Status flags."]
13247    pub status: MavGeneratorStatusFlag,
13248    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13249    pub battery_current: f32,
13250    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13251    pub load_current: f32,
13252    #[doc = "The power being generated. NaN: field not provided"]
13253    pub power_generated: f32,
13254    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13255    pub bus_voltage: f32,
13256    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13257    pub bat_current_setpoint: f32,
13258    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13259    pub runtime: u32,
13260    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13261    pub time_until_maintenance: i32,
13262    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13263    pub generator_speed: u16,
13264    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13265    pub rectifier_temperature: i16,
13266    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13267    pub generator_temperature: i16,
13268}
13269impl GENERATOR_STATUS_DATA {
13270    pub const ENCODED_LEN: usize = 42usize;
13271    pub const DEFAULT: Self = Self {
13272        status: MavGeneratorStatusFlag::DEFAULT,
13273        battery_current: 0.0_f32,
13274        load_current: 0.0_f32,
13275        power_generated: 0.0_f32,
13276        bus_voltage: 0.0_f32,
13277        bat_current_setpoint: 0.0_f32,
13278        runtime: 0_u32,
13279        time_until_maintenance: 0_i32,
13280        generator_speed: 0_u16,
13281        rectifier_temperature: 0_i16,
13282        generator_temperature: 0_i16,
13283    };
13284    #[cfg(feature = "arbitrary")]
13285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13286        use arbitrary::{Arbitrary, Unstructured};
13287        let mut buf = [0u8; 1024];
13288        rng.fill_bytes(&mut buf);
13289        let mut unstructured = Unstructured::new(&buf);
13290        Self::arbitrary(&mut unstructured).unwrap_or_default()
13291    }
13292}
13293impl Default for GENERATOR_STATUS_DATA {
13294    fn default() -> Self {
13295        Self::DEFAULT.clone()
13296    }
13297}
13298impl MessageData for GENERATOR_STATUS_DATA {
13299    type Message = MavMessage;
13300    const ID: u32 = 373u32;
13301    const NAME: &'static str = "GENERATOR_STATUS";
13302    const EXTRA_CRC: u8 = 117u8;
13303    const ENCODED_LEN: usize = 42usize;
13304    fn deser(
13305        _version: MavlinkVersion,
13306        __input: &[u8],
13307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13308        let avail_len = __input.len();
13309        let mut payload_buf = [0; Self::ENCODED_LEN];
13310        let mut buf = if avail_len < Self::ENCODED_LEN {
13311            payload_buf[0..avail_len].copy_from_slice(__input);
13312            Bytes::new(&payload_buf)
13313        } else {
13314            Bytes::new(__input)
13315        };
13316        let mut __struct = Self::default();
13317        let tmp = buf.get_u64_le();
13318        __struct.status = MavGeneratorStatusFlag::from_bits(tmp).ok_or(
13319            ::mavlink_core::error::ParserError::InvalidFlag {
13320                flag_type: "MavGeneratorStatusFlag",
13321                value: tmp as u64,
13322            },
13323        )?;
13324        __struct.battery_current = buf.get_f32_le();
13325        __struct.load_current = buf.get_f32_le();
13326        __struct.power_generated = buf.get_f32_le();
13327        __struct.bus_voltage = buf.get_f32_le();
13328        __struct.bat_current_setpoint = buf.get_f32_le();
13329        __struct.runtime = buf.get_u32_le();
13330        __struct.time_until_maintenance = buf.get_i32_le();
13331        __struct.generator_speed = buf.get_u16_le();
13332        __struct.rectifier_temperature = buf.get_i16_le();
13333        __struct.generator_temperature = buf.get_i16_le();
13334        Ok(__struct)
13335    }
13336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13337        let mut __tmp = BytesMut::new(bytes);
13338        #[allow(clippy::absurd_extreme_comparisons)]
13339        #[allow(unused_comparisons)]
13340        if __tmp.remaining() < Self::ENCODED_LEN {
13341            panic!(
13342                "buffer is too small (need {} bytes, but got {})",
13343                Self::ENCODED_LEN,
13344                __tmp.remaining(),
13345            )
13346        }
13347        __tmp.put_u64_le(self.status.bits());
13348        __tmp.put_f32_le(self.battery_current);
13349        __tmp.put_f32_le(self.load_current);
13350        __tmp.put_f32_le(self.power_generated);
13351        __tmp.put_f32_le(self.bus_voltage);
13352        __tmp.put_f32_le(self.bat_current_setpoint);
13353        __tmp.put_u32_le(self.runtime);
13354        __tmp.put_i32_le(self.time_until_maintenance);
13355        __tmp.put_u16_le(self.generator_speed);
13356        __tmp.put_i16_le(self.rectifier_temperature);
13357        __tmp.put_i16_le(self.generator_temperature);
13358        if matches!(version, MavlinkVersion::V2) {
13359            let len = __tmp.len();
13360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13361        } else {
13362            __tmp.len()
13363        }
13364    }
13365}
13366#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13367#[doc = ""]
13368#[doc = "ID: 285"]
13369#[derive(Debug, Clone, PartialEq)]
13370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13372#[cfg_attr(feature = "ts", derive(TS))]
13373#[cfg_attr(feature = "ts", ts(export))]
13374pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13375    #[doc = "Timestamp (time since system boot)."]
13376    pub time_boot_ms: u32,
13377    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13379    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13380    pub q: [f32; 4],
13381    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13382    pub angular_velocity_x: f32,
13383    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13384    pub angular_velocity_y: f32,
13385    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13386    pub angular_velocity_z: f32,
13387    #[doc = "Failure flags (0 for no failure)"]
13388    pub failure_flags: GimbalDeviceErrorFlags,
13389    #[doc = "Current gimbal flags set."]
13390    pub flags: GimbalDeviceFlags,
13391    #[doc = "System ID"]
13392    pub target_system: u8,
13393    #[doc = "Component ID"]
13394    pub target_component: u8,
13395    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13396    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13397    pub delta_yaw: f32,
13398    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13399    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13400    pub delta_yaw_velocity: f32,
13401    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13403    pub gimbal_device_id: u8,
13404}
13405impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13406    pub const ENCODED_LEN: usize = 49usize;
13407    pub const DEFAULT: Self = Self {
13408        time_boot_ms: 0_u32,
13409        q: [0.0_f32; 4usize],
13410        angular_velocity_x: 0.0_f32,
13411        angular_velocity_y: 0.0_f32,
13412        angular_velocity_z: 0.0_f32,
13413        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13414        flags: GimbalDeviceFlags::DEFAULT,
13415        target_system: 0_u8,
13416        target_component: 0_u8,
13417        delta_yaw: 0.0_f32,
13418        delta_yaw_velocity: 0.0_f32,
13419        gimbal_device_id: 0_u8,
13420    };
13421    #[cfg(feature = "arbitrary")]
13422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13423        use arbitrary::{Arbitrary, Unstructured};
13424        let mut buf = [0u8; 1024];
13425        rng.fill_bytes(&mut buf);
13426        let mut unstructured = Unstructured::new(&buf);
13427        Self::arbitrary(&mut unstructured).unwrap_or_default()
13428    }
13429}
13430impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13431    fn default() -> Self {
13432        Self::DEFAULT.clone()
13433    }
13434}
13435impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13436    type Message = MavMessage;
13437    const ID: u32 = 285u32;
13438    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13439    const EXTRA_CRC: u8 = 137u8;
13440    const ENCODED_LEN: usize = 49usize;
13441    fn deser(
13442        _version: MavlinkVersion,
13443        __input: &[u8],
13444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13445        let avail_len = __input.len();
13446        let mut payload_buf = [0; Self::ENCODED_LEN];
13447        let mut buf = if avail_len < Self::ENCODED_LEN {
13448            payload_buf[0..avail_len].copy_from_slice(__input);
13449            Bytes::new(&payload_buf)
13450        } else {
13451            Bytes::new(__input)
13452        };
13453        let mut __struct = Self::default();
13454        __struct.time_boot_ms = buf.get_u32_le();
13455        for v in &mut __struct.q {
13456            let val = buf.get_f32_le();
13457            *v = val;
13458        }
13459        __struct.angular_velocity_x = buf.get_f32_le();
13460        __struct.angular_velocity_y = buf.get_f32_le();
13461        __struct.angular_velocity_z = buf.get_f32_le();
13462        let tmp = buf.get_u32_le();
13463        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(tmp).ok_or(
13464            ::mavlink_core::error::ParserError::InvalidFlag {
13465                flag_type: "GimbalDeviceErrorFlags",
13466                value: tmp as u64,
13467            },
13468        )?;
13469        let tmp = buf.get_u16_le();
13470        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
13471            ::mavlink_core::error::ParserError::InvalidFlag {
13472                flag_type: "GimbalDeviceFlags",
13473                value: tmp as u64,
13474            },
13475        )?;
13476        __struct.target_system = buf.get_u8();
13477        __struct.target_component = buf.get_u8();
13478        __struct.delta_yaw = buf.get_f32_le();
13479        __struct.delta_yaw_velocity = buf.get_f32_le();
13480        __struct.gimbal_device_id = buf.get_u8();
13481        Ok(__struct)
13482    }
13483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13484        let mut __tmp = BytesMut::new(bytes);
13485        #[allow(clippy::absurd_extreme_comparisons)]
13486        #[allow(unused_comparisons)]
13487        if __tmp.remaining() < Self::ENCODED_LEN {
13488            panic!(
13489                "buffer is too small (need {} bytes, but got {})",
13490                Self::ENCODED_LEN,
13491                __tmp.remaining(),
13492            )
13493        }
13494        __tmp.put_u32_le(self.time_boot_ms);
13495        for val in &self.q {
13496            __tmp.put_f32_le(*val);
13497        }
13498        __tmp.put_f32_le(self.angular_velocity_x);
13499        __tmp.put_f32_le(self.angular_velocity_y);
13500        __tmp.put_f32_le(self.angular_velocity_z);
13501        __tmp.put_u32_le(self.failure_flags.bits());
13502        __tmp.put_u16_le(self.flags.bits());
13503        __tmp.put_u8(self.target_system);
13504        __tmp.put_u8(self.target_component);
13505        if matches!(version, MavlinkVersion::V2) {
13506            __tmp.put_f32_le(self.delta_yaw);
13507            __tmp.put_f32_le(self.delta_yaw_velocity);
13508            __tmp.put_u8(self.gimbal_device_id);
13509            let len = __tmp.len();
13510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13511        } else {
13512            __tmp.len()
13513        }
13514    }
13515}
13516#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13517#[doc = ""]
13518#[doc = "ID: 283"]
13519#[derive(Debug, Clone, PartialEq)]
13520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13522#[cfg_attr(feature = "ts", derive(TS))]
13523#[cfg_attr(feature = "ts", ts(export))]
13524pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13525    #[doc = "UID of gimbal hardware (0 if unknown)."]
13526    pub uid: u64,
13527    #[doc = "Timestamp (time since system boot)."]
13528    pub time_boot_ms: u32,
13529    #[doc = "0xff)."]
13530    pub firmware_version: u32,
13531    #[doc = "0xff)."]
13532    pub hardware_version: u32,
13533    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13534    pub roll_min: f32,
13535    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13536    pub roll_max: f32,
13537    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13538    pub pitch_min: f32,
13539    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13540    pub pitch_max: f32,
13541    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13542    pub yaw_min: f32,
13543    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13544    pub yaw_max: f32,
13545    #[doc = "Bitmap of gimbal capability flags."]
13546    pub cap_flags: GimbalDeviceCapFlags,
13547    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13548    pub custom_cap_flags: u16,
13549    #[doc = "Name of the gimbal vendor."]
13550    #[cfg_attr(feature = "ts", ts(type = "string"))]
13551    pub vendor_name: CharArray<32>,
13552    #[doc = "Name of the gimbal model."]
13553    #[cfg_attr(feature = "ts", ts(type = "string"))]
13554    pub model_name: CharArray<32>,
13555    #[doc = "Custom name of the gimbal given to it by the user."]
13556    #[cfg_attr(feature = "ts", ts(type = "string"))]
13557    pub custom_name: CharArray<32>,
13558    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13559    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13560    pub gimbal_device_id: u8,
13561}
13562impl GIMBAL_DEVICE_INFORMATION_DATA {
13563    pub const ENCODED_LEN: usize = 145usize;
13564    pub const DEFAULT: Self = Self {
13565        uid: 0_u64,
13566        time_boot_ms: 0_u32,
13567        firmware_version: 0_u32,
13568        hardware_version: 0_u32,
13569        roll_min: 0.0_f32,
13570        roll_max: 0.0_f32,
13571        pitch_min: 0.0_f32,
13572        pitch_max: 0.0_f32,
13573        yaw_min: 0.0_f32,
13574        yaw_max: 0.0_f32,
13575        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13576        custom_cap_flags: 0_u16,
13577        vendor_name: CharArray::new([0_u8; 32usize]),
13578        model_name: CharArray::new([0_u8; 32usize]),
13579        custom_name: CharArray::new([0_u8; 32usize]),
13580        gimbal_device_id: 0_u8,
13581    };
13582    #[cfg(feature = "arbitrary")]
13583    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13584        use arbitrary::{Arbitrary, Unstructured};
13585        let mut buf = [0u8; 1024];
13586        rng.fill_bytes(&mut buf);
13587        let mut unstructured = Unstructured::new(&buf);
13588        Self::arbitrary(&mut unstructured).unwrap_or_default()
13589    }
13590}
13591impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13592    fn default() -> Self {
13593        Self::DEFAULT.clone()
13594    }
13595}
13596impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13597    type Message = MavMessage;
13598    const ID: u32 = 283u32;
13599    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13600    const EXTRA_CRC: u8 = 74u8;
13601    const ENCODED_LEN: usize = 145usize;
13602    fn deser(
13603        _version: MavlinkVersion,
13604        __input: &[u8],
13605    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13606        let avail_len = __input.len();
13607        let mut payload_buf = [0; Self::ENCODED_LEN];
13608        let mut buf = if avail_len < Self::ENCODED_LEN {
13609            payload_buf[0..avail_len].copy_from_slice(__input);
13610            Bytes::new(&payload_buf)
13611        } else {
13612            Bytes::new(__input)
13613        };
13614        let mut __struct = Self::default();
13615        __struct.uid = buf.get_u64_le();
13616        __struct.time_boot_ms = buf.get_u32_le();
13617        __struct.firmware_version = buf.get_u32_le();
13618        __struct.hardware_version = buf.get_u32_le();
13619        __struct.roll_min = buf.get_f32_le();
13620        __struct.roll_max = buf.get_f32_le();
13621        __struct.pitch_min = buf.get_f32_le();
13622        __struct.pitch_max = buf.get_f32_le();
13623        __struct.yaw_min = buf.get_f32_le();
13624        __struct.yaw_max = buf.get_f32_le();
13625        let tmp = buf.get_u16_le();
13626        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(tmp).ok_or(
13627            ::mavlink_core::error::ParserError::InvalidFlag {
13628                flag_type: "GimbalDeviceCapFlags",
13629                value: tmp as u64,
13630            },
13631        )?;
13632        __struct.custom_cap_flags = buf.get_u16_le();
13633        let mut tmp = [0_u8; 32usize];
13634        for v in &mut tmp {
13635            *v = buf.get_u8();
13636        }
13637        __struct.vendor_name = CharArray::new(tmp);
13638        let mut tmp = [0_u8; 32usize];
13639        for v in &mut tmp {
13640            *v = buf.get_u8();
13641        }
13642        __struct.model_name = CharArray::new(tmp);
13643        let mut tmp = [0_u8; 32usize];
13644        for v in &mut tmp {
13645            *v = buf.get_u8();
13646        }
13647        __struct.custom_name = CharArray::new(tmp);
13648        __struct.gimbal_device_id = buf.get_u8();
13649        Ok(__struct)
13650    }
13651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13652        let mut __tmp = BytesMut::new(bytes);
13653        #[allow(clippy::absurd_extreme_comparisons)]
13654        #[allow(unused_comparisons)]
13655        if __tmp.remaining() < Self::ENCODED_LEN {
13656            panic!(
13657                "buffer is too small (need {} bytes, but got {})",
13658                Self::ENCODED_LEN,
13659                __tmp.remaining(),
13660            )
13661        }
13662        __tmp.put_u64_le(self.uid);
13663        __tmp.put_u32_le(self.time_boot_ms);
13664        __tmp.put_u32_le(self.firmware_version);
13665        __tmp.put_u32_le(self.hardware_version);
13666        __tmp.put_f32_le(self.roll_min);
13667        __tmp.put_f32_le(self.roll_max);
13668        __tmp.put_f32_le(self.pitch_min);
13669        __tmp.put_f32_le(self.pitch_max);
13670        __tmp.put_f32_le(self.yaw_min);
13671        __tmp.put_f32_le(self.yaw_max);
13672        __tmp.put_u16_le(self.cap_flags.bits());
13673        __tmp.put_u16_le(self.custom_cap_flags);
13674        for val in &self.vendor_name {
13675            __tmp.put_u8(*val);
13676        }
13677        for val in &self.model_name {
13678            __tmp.put_u8(*val);
13679        }
13680        for val in &self.custom_name {
13681            __tmp.put_u8(*val);
13682        }
13683        if matches!(version, MavlinkVersion::V2) {
13684            __tmp.put_u8(self.gimbal_device_id);
13685            let len = __tmp.len();
13686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13687        } else {
13688            __tmp.len()
13689        }
13690    }
13691}
13692#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13693#[doc = ""]
13694#[doc = "ID: 284"]
13695#[derive(Debug, Clone, PartialEq)]
13696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13698#[cfg_attr(feature = "ts", derive(TS))]
13699#[cfg_attr(feature = "ts", ts(export))]
13700pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13701    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13703    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13704    pub q: [f32; 4],
13705    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13706    pub angular_velocity_x: f32,
13707    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13708    pub angular_velocity_y: f32,
13709    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13710    pub angular_velocity_z: f32,
13711    #[doc = "Low level gimbal flags."]
13712    pub flags: GimbalDeviceFlags,
13713    #[doc = "System ID"]
13714    pub target_system: u8,
13715    #[doc = "Component ID"]
13716    pub target_component: u8,
13717}
13718impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13719    pub const ENCODED_LEN: usize = 32usize;
13720    pub const DEFAULT: Self = Self {
13721        q: [0.0_f32; 4usize],
13722        angular_velocity_x: 0.0_f32,
13723        angular_velocity_y: 0.0_f32,
13724        angular_velocity_z: 0.0_f32,
13725        flags: GimbalDeviceFlags::DEFAULT,
13726        target_system: 0_u8,
13727        target_component: 0_u8,
13728    };
13729    #[cfg(feature = "arbitrary")]
13730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13731        use arbitrary::{Arbitrary, Unstructured};
13732        let mut buf = [0u8; 1024];
13733        rng.fill_bytes(&mut buf);
13734        let mut unstructured = Unstructured::new(&buf);
13735        Self::arbitrary(&mut unstructured).unwrap_or_default()
13736    }
13737}
13738impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13739    fn default() -> Self {
13740        Self::DEFAULT.clone()
13741    }
13742}
13743impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13744    type Message = MavMessage;
13745    const ID: u32 = 284u32;
13746    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13747    const EXTRA_CRC: u8 = 99u8;
13748    const ENCODED_LEN: usize = 32usize;
13749    fn deser(
13750        _version: MavlinkVersion,
13751        __input: &[u8],
13752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13753        let avail_len = __input.len();
13754        let mut payload_buf = [0; Self::ENCODED_LEN];
13755        let mut buf = if avail_len < Self::ENCODED_LEN {
13756            payload_buf[0..avail_len].copy_from_slice(__input);
13757            Bytes::new(&payload_buf)
13758        } else {
13759            Bytes::new(__input)
13760        };
13761        let mut __struct = Self::default();
13762        for v in &mut __struct.q {
13763            let val = buf.get_f32_le();
13764            *v = val;
13765        }
13766        __struct.angular_velocity_x = buf.get_f32_le();
13767        __struct.angular_velocity_y = buf.get_f32_le();
13768        __struct.angular_velocity_z = buf.get_f32_le();
13769        let tmp = buf.get_u16_le();
13770        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
13771            ::mavlink_core::error::ParserError::InvalidFlag {
13772                flag_type: "GimbalDeviceFlags",
13773                value: tmp as u64,
13774            },
13775        )?;
13776        __struct.target_system = buf.get_u8();
13777        __struct.target_component = buf.get_u8();
13778        Ok(__struct)
13779    }
13780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13781        let mut __tmp = BytesMut::new(bytes);
13782        #[allow(clippy::absurd_extreme_comparisons)]
13783        #[allow(unused_comparisons)]
13784        if __tmp.remaining() < Self::ENCODED_LEN {
13785            panic!(
13786                "buffer is too small (need {} bytes, but got {})",
13787                Self::ENCODED_LEN,
13788                __tmp.remaining(),
13789            )
13790        }
13791        for val in &self.q {
13792            __tmp.put_f32_le(*val);
13793        }
13794        __tmp.put_f32_le(self.angular_velocity_x);
13795        __tmp.put_f32_le(self.angular_velocity_y);
13796        __tmp.put_f32_le(self.angular_velocity_z);
13797        __tmp.put_u16_le(self.flags.bits());
13798        __tmp.put_u8(self.target_system);
13799        __tmp.put_u8(self.target_component);
13800        if matches!(version, MavlinkVersion::V2) {
13801            let len = __tmp.len();
13802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13803        } else {
13804            __tmp.len()
13805        }
13806    }
13807}
13808#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13809#[doc = ""]
13810#[doc = "ID: 280"]
13811#[derive(Debug, Clone, PartialEq)]
13812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13814#[cfg_attr(feature = "ts", derive(TS))]
13815#[cfg_attr(feature = "ts", ts(export))]
13816pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13817    #[doc = "Timestamp (time since system boot)."]
13818    pub time_boot_ms: u32,
13819    #[doc = "Bitmap of gimbal capability flags."]
13820    pub cap_flags: GimbalManagerCapFlags,
13821    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13822    pub roll_min: f32,
13823    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13824    pub roll_max: f32,
13825    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13826    pub pitch_min: f32,
13827    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13828    pub pitch_max: f32,
13829    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13830    pub yaw_min: f32,
13831    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13832    pub yaw_max: f32,
13833    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13834    pub gimbal_device_id: u8,
13835}
13836impl GIMBAL_MANAGER_INFORMATION_DATA {
13837    pub const ENCODED_LEN: usize = 33usize;
13838    pub const DEFAULT: Self = Self {
13839        time_boot_ms: 0_u32,
13840        cap_flags: GimbalManagerCapFlags::DEFAULT,
13841        roll_min: 0.0_f32,
13842        roll_max: 0.0_f32,
13843        pitch_min: 0.0_f32,
13844        pitch_max: 0.0_f32,
13845        yaw_min: 0.0_f32,
13846        yaw_max: 0.0_f32,
13847        gimbal_device_id: 0_u8,
13848    };
13849    #[cfg(feature = "arbitrary")]
13850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13851        use arbitrary::{Arbitrary, Unstructured};
13852        let mut buf = [0u8; 1024];
13853        rng.fill_bytes(&mut buf);
13854        let mut unstructured = Unstructured::new(&buf);
13855        Self::arbitrary(&mut unstructured).unwrap_or_default()
13856    }
13857}
13858impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13859    fn default() -> Self {
13860        Self::DEFAULT.clone()
13861    }
13862}
13863impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13864    type Message = MavMessage;
13865    const ID: u32 = 280u32;
13866    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13867    const EXTRA_CRC: u8 = 70u8;
13868    const ENCODED_LEN: usize = 33usize;
13869    fn deser(
13870        _version: MavlinkVersion,
13871        __input: &[u8],
13872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13873        let avail_len = __input.len();
13874        let mut payload_buf = [0; Self::ENCODED_LEN];
13875        let mut buf = if avail_len < Self::ENCODED_LEN {
13876            payload_buf[0..avail_len].copy_from_slice(__input);
13877            Bytes::new(&payload_buf)
13878        } else {
13879            Bytes::new(__input)
13880        };
13881        let mut __struct = Self::default();
13882        __struct.time_boot_ms = buf.get_u32_le();
13883        let tmp = buf.get_u32_le();
13884        __struct.cap_flags = GimbalManagerCapFlags::from_bits(tmp).ok_or(
13885            ::mavlink_core::error::ParserError::InvalidFlag {
13886                flag_type: "GimbalManagerCapFlags",
13887                value: tmp as u64,
13888            },
13889        )?;
13890        __struct.roll_min = buf.get_f32_le();
13891        __struct.roll_max = buf.get_f32_le();
13892        __struct.pitch_min = buf.get_f32_le();
13893        __struct.pitch_max = buf.get_f32_le();
13894        __struct.yaw_min = buf.get_f32_le();
13895        __struct.yaw_max = buf.get_f32_le();
13896        __struct.gimbal_device_id = buf.get_u8();
13897        Ok(__struct)
13898    }
13899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13900        let mut __tmp = BytesMut::new(bytes);
13901        #[allow(clippy::absurd_extreme_comparisons)]
13902        #[allow(unused_comparisons)]
13903        if __tmp.remaining() < Self::ENCODED_LEN {
13904            panic!(
13905                "buffer is too small (need {} bytes, but got {})",
13906                Self::ENCODED_LEN,
13907                __tmp.remaining(),
13908            )
13909        }
13910        __tmp.put_u32_le(self.time_boot_ms);
13911        __tmp.put_u32_le(self.cap_flags.bits());
13912        __tmp.put_f32_le(self.roll_min);
13913        __tmp.put_f32_le(self.roll_max);
13914        __tmp.put_f32_le(self.pitch_min);
13915        __tmp.put_f32_le(self.pitch_max);
13916        __tmp.put_f32_le(self.yaw_min);
13917        __tmp.put_f32_le(self.yaw_max);
13918        __tmp.put_u8(self.gimbal_device_id);
13919        if matches!(version, MavlinkVersion::V2) {
13920            let len = __tmp.len();
13921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13922        } else {
13923            __tmp.len()
13924        }
13925    }
13926}
13927#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13928#[doc = ""]
13929#[doc = "ID: 282"]
13930#[derive(Debug, Clone, PartialEq)]
13931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13933#[cfg_attr(feature = "ts", derive(TS))]
13934#[cfg_attr(feature = "ts", ts(export))]
13935pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13936    #[doc = "High level gimbal manager flags to use."]
13937    pub flags: GimbalManagerFlags,
13938    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13940    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13941    pub q: [f32; 4],
13942    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13943    pub angular_velocity_x: f32,
13944    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13945    pub angular_velocity_y: f32,
13946    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13947    pub angular_velocity_z: f32,
13948    #[doc = "System ID"]
13949    pub target_system: u8,
13950    #[doc = "Component ID"]
13951    pub target_component: u8,
13952    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13953    pub gimbal_device_id: u8,
13954}
13955impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13956    pub const ENCODED_LEN: usize = 35usize;
13957    pub const DEFAULT: Self = Self {
13958        flags: GimbalManagerFlags::DEFAULT,
13959        q: [0.0_f32; 4usize],
13960        angular_velocity_x: 0.0_f32,
13961        angular_velocity_y: 0.0_f32,
13962        angular_velocity_z: 0.0_f32,
13963        target_system: 0_u8,
13964        target_component: 0_u8,
13965        gimbal_device_id: 0_u8,
13966    };
13967    #[cfg(feature = "arbitrary")]
13968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13969        use arbitrary::{Arbitrary, Unstructured};
13970        let mut buf = [0u8; 1024];
13971        rng.fill_bytes(&mut buf);
13972        let mut unstructured = Unstructured::new(&buf);
13973        Self::arbitrary(&mut unstructured).unwrap_or_default()
13974    }
13975}
13976impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13977    fn default() -> Self {
13978        Self::DEFAULT.clone()
13979    }
13980}
13981impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13982    type Message = MavMessage;
13983    const ID: u32 = 282u32;
13984    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13985    const EXTRA_CRC: u8 = 123u8;
13986    const ENCODED_LEN: usize = 35usize;
13987    fn deser(
13988        _version: MavlinkVersion,
13989        __input: &[u8],
13990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13991        let avail_len = __input.len();
13992        let mut payload_buf = [0; Self::ENCODED_LEN];
13993        let mut buf = if avail_len < Self::ENCODED_LEN {
13994            payload_buf[0..avail_len].copy_from_slice(__input);
13995            Bytes::new(&payload_buf)
13996        } else {
13997            Bytes::new(__input)
13998        };
13999        let mut __struct = Self::default();
14000        let tmp = buf.get_u32_le();
14001        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14002            ::mavlink_core::error::ParserError::InvalidFlag {
14003                flag_type: "GimbalManagerFlags",
14004                value: tmp as u64,
14005            },
14006        )?;
14007        for v in &mut __struct.q {
14008            let val = buf.get_f32_le();
14009            *v = val;
14010        }
14011        __struct.angular_velocity_x = buf.get_f32_le();
14012        __struct.angular_velocity_y = buf.get_f32_le();
14013        __struct.angular_velocity_z = buf.get_f32_le();
14014        __struct.target_system = buf.get_u8();
14015        __struct.target_component = buf.get_u8();
14016        __struct.gimbal_device_id = buf.get_u8();
14017        Ok(__struct)
14018    }
14019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14020        let mut __tmp = BytesMut::new(bytes);
14021        #[allow(clippy::absurd_extreme_comparisons)]
14022        #[allow(unused_comparisons)]
14023        if __tmp.remaining() < Self::ENCODED_LEN {
14024            panic!(
14025                "buffer is too small (need {} bytes, but got {})",
14026                Self::ENCODED_LEN,
14027                __tmp.remaining(),
14028            )
14029        }
14030        __tmp.put_u32_le(self.flags.bits());
14031        for val in &self.q {
14032            __tmp.put_f32_le(*val);
14033        }
14034        __tmp.put_f32_le(self.angular_velocity_x);
14035        __tmp.put_f32_le(self.angular_velocity_y);
14036        __tmp.put_f32_le(self.angular_velocity_z);
14037        __tmp.put_u8(self.target_system);
14038        __tmp.put_u8(self.target_component);
14039        __tmp.put_u8(self.gimbal_device_id);
14040        if matches!(version, MavlinkVersion::V2) {
14041            let len = __tmp.len();
14042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14043        } else {
14044            __tmp.len()
14045        }
14046    }
14047}
14048#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14049#[doc = ""]
14050#[doc = "ID: 288"]
14051#[derive(Debug, Clone, PartialEq)]
14052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14054#[cfg_attr(feature = "ts", derive(TS))]
14055#[cfg_attr(feature = "ts", ts(export))]
14056pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14057    #[doc = "High level gimbal manager flags."]
14058    pub flags: GimbalManagerFlags,
14059    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14060    pub pitch: f32,
14061    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14062    pub yaw: f32,
14063    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14064    pub pitch_rate: f32,
14065    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14066    pub yaw_rate: f32,
14067    #[doc = "System ID"]
14068    pub target_system: u8,
14069    #[doc = "Component ID"]
14070    pub target_component: u8,
14071    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14072    pub gimbal_device_id: u8,
14073}
14074impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14075    pub const ENCODED_LEN: usize = 23usize;
14076    pub const DEFAULT: Self = Self {
14077        flags: GimbalManagerFlags::DEFAULT,
14078        pitch: 0.0_f32,
14079        yaw: 0.0_f32,
14080        pitch_rate: 0.0_f32,
14081        yaw_rate: 0.0_f32,
14082        target_system: 0_u8,
14083        target_component: 0_u8,
14084        gimbal_device_id: 0_u8,
14085    };
14086    #[cfg(feature = "arbitrary")]
14087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14088        use arbitrary::{Arbitrary, Unstructured};
14089        let mut buf = [0u8; 1024];
14090        rng.fill_bytes(&mut buf);
14091        let mut unstructured = Unstructured::new(&buf);
14092        Self::arbitrary(&mut unstructured).unwrap_or_default()
14093    }
14094}
14095impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14096    fn default() -> Self {
14097        Self::DEFAULT.clone()
14098    }
14099}
14100impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14101    type Message = MavMessage;
14102    const ID: u32 = 288u32;
14103    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
14104    const EXTRA_CRC: u8 = 20u8;
14105    const ENCODED_LEN: usize = 23usize;
14106    fn deser(
14107        _version: MavlinkVersion,
14108        __input: &[u8],
14109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14110        let avail_len = __input.len();
14111        let mut payload_buf = [0; Self::ENCODED_LEN];
14112        let mut buf = if avail_len < Self::ENCODED_LEN {
14113            payload_buf[0..avail_len].copy_from_slice(__input);
14114            Bytes::new(&payload_buf)
14115        } else {
14116            Bytes::new(__input)
14117        };
14118        let mut __struct = Self::default();
14119        let tmp = buf.get_u32_le();
14120        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14121            ::mavlink_core::error::ParserError::InvalidFlag {
14122                flag_type: "GimbalManagerFlags",
14123                value: tmp as u64,
14124            },
14125        )?;
14126        __struct.pitch = buf.get_f32_le();
14127        __struct.yaw = buf.get_f32_le();
14128        __struct.pitch_rate = buf.get_f32_le();
14129        __struct.yaw_rate = buf.get_f32_le();
14130        __struct.target_system = buf.get_u8();
14131        __struct.target_component = buf.get_u8();
14132        __struct.gimbal_device_id = buf.get_u8();
14133        Ok(__struct)
14134    }
14135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14136        let mut __tmp = BytesMut::new(bytes);
14137        #[allow(clippy::absurd_extreme_comparisons)]
14138        #[allow(unused_comparisons)]
14139        if __tmp.remaining() < Self::ENCODED_LEN {
14140            panic!(
14141                "buffer is too small (need {} bytes, but got {})",
14142                Self::ENCODED_LEN,
14143                __tmp.remaining(),
14144            )
14145        }
14146        __tmp.put_u32_le(self.flags.bits());
14147        __tmp.put_f32_le(self.pitch);
14148        __tmp.put_f32_le(self.yaw);
14149        __tmp.put_f32_le(self.pitch_rate);
14150        __tmp.put_f32_le(self.yaw_rate);
14151        __tmp.put_u8(self.target_system);
14152        __tmp.put_u8(self.target_component);
14153        __tmp.put_u8(self.gimbal_device_id);
14154        if matches!(version, MavlinkVersion::V2) {
14155            let len = __tmp.len();
14156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14157        } else {
14158            __tmp.len()
14159        }
14160    }
14161}
14162#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
14163#[doc = ""]
14164#[doc = "ID: 287"]
14165#[derive(Debug, Clone, PartialEq)]
14166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14168#[cfg_attr(feature = "ts", derive(TS))]
14169#[cfg_attr(feature = "ts", ts(export))]
14170pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14171    #[doc = "High level gimbal manager flags to use."]
14172    pub flags: GimbalManagerFlags,
14173    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
14174    pub pitch: f32,
14175    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
14176    pub yaw: f32,
14177    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
14178    pub pitch_rate: f32,
14179    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
14180    pub yaw_rate: f32,
14181    #[doc = "System ID"]
14182    pub target_system: u8,
14183    #[doc = "Component ID"]
14184    pub target_component: u8,
14185    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14186    pub gimbal_device_id: u8,
14187}
14188impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14189    pub const ENCODED_LEN: usize = 23usize;
14190    pub const DEFAULT: Self = Self {
14191        flags: GimbalManagerFlags::DEFAULT,
14192        pitch: 0.0_f32,
14193        yaw: 0.0_f32,
14194        pitch_rate: 0.0_f32,
14195        yaw_rate: 0.0_f32,
14196        target_system: 0_u8,
14197        target_component: 0_u8,
14198        gimbal_device_id: 0_u8,
14199    };
14200    #[cfg(feature = "arbitrary")]
14201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14202        use arbitrary::{Arbitrary, Unstructured};
14203        let mut buf = [0u8; 1024];
14204        rng.fill_bytes(&mut buf);
14205        let mut unstructured = Unstructured::new(&buf);
14206        Self::arbitrary(&mut unstructured).unwrap_or_default()
14207    }
14208}
14209impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14210    fn default() -> Self {
14211        Self::DEFAULT.clone()
14212    }
14213}
14214impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14215    type Message = MavMessage;
14216    const ID: u32 = 287u32;
14217    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14218    const EXTRA_CRC: u8 = 1u8;
14219    const ENCODED_LEN: usize = 23usize;
14220    fn deser(
14221        _version: MavlinkVersion,
14222        __input: &[u8],
14223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14224        let avail_len = __input.len();
14225        let mut payload_buf = [0; Self::ENCODED_LEN];
14226        let mut buf = if avail_len < Self::ENCODED_LEN {
14227            payload_buf[0..avail_len].copy_from_slice(__input);
14228            Bytes::new(&payload_buf)
14229        } else {
14230            Bytes::new(__input)
14231        };
14232        let mut __struct = Self::default();
14233        let tmp = buf.get_u32_le();
14234        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14235            ::mavlink_core::error::ParserError::InvalidFlag {
14236                flag_type: "GimbalManagerFlags",
14237                value: tmp as u64,
14238            },
14239        )?;
14240        __struct.pitch = buf.get_f32_le();
14241        __struct.yaw = buf.get_f32_le();
14242        __struct.pitch_rate = buf.get_f32_le();
14243        __struct.yaw_rate = buf.get_f32_le();
14244        __struct.target_system = buf.get_u8();
14245        __struct.target_component = buf.get_u8();
14246        __struct.gimbal_device_id = buf.get_u8();
14247        Ok(__struct)
14248    }
14249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14250        let mut __tmp = BytesMut::new(bytes);
14251        #[allow(clippy::absurd_extreme_comparisons)]
14252        #[allow(unused_comparisons)]
14253        if __tmp.remaining() < Self::ENCODED_LEN {
14254            panic!(
14255                "buffer is too small (need {} bytes, but got {})",
14256                Self::ENCODED_LEN,
14257                __tmp.remaining(),
14258            )
14259        }
14260        __tmp.put_u32_le(self.flags.bits());
14261        __tmp.put_f32_le(self.pitch);
14262        __tmp.put_f32_le(self.yaw);
14263        __tmp.put_f32_le(self.pitch_rate);
14264        __tmp.put_f32_le(self.yaw_rate);
14265        __tmp.put_u8(self.target_system);
14266        __tmp.put_u8(self.target_component);
14267        __tmp.put_u8(self.gimbal_device_id);
14268        if matches!(version, MavlinkVersion::V2) {
14269            let len = __tmp.len();
14270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14271        } else {
14272            __tmp.len()
14273        }
14274    }
14275}
14276#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14277#[doc = ""]
14278#[doc = "ID: 281"]
14279#[derive(Debug, Clone, PartialEq)]
14280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14282#[cfg_attr(feature = "ts", derive(TS))]
14283#[cfg_attr(feature = "ts", ts(export))]
14284pub struct GIMBAL_MANAGER_STATUS_DATA {
14285    #[doc = "Timestamp (time since system boot)."]
14286    pub time_boot_ms: u32,
14287    #[doc = "High level gimbal manager flags currently applied."]
14288    pub flags: GimbalManagerFlags,
14289    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14290    pub gimbal_device_id: u8,
14291    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14292    pub primary_control_sysid: u8,
14293    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14294    pub primary_control_compid: u8,
14295    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14296    pub secondary_control_sysid: u8,
14297    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14298    pub secondary_control_compid: u8,
14299}
14300impl GIMBAL_MANAGER_STATUS_DATA {
14301    pub const ENCODED_LEN: usize = 13usize;
14302    pub const DEFAULT: Self = Self {
14303        time_boot_ms: 0_u32,
14304        flags: GimbalManagerFlags::DEFAULT,
14305        gimbal_device_id: 0_u8,
14306        primary_control_sysid: 0_u8,
14307        primary_control_compid: 0_u8,
14308        secondary_control_sysid: 0_u8,
14309        secondary_control_compid: 0_u8,
14310    };
14311    #[cfg(feature = "arbitrary")]
14312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14313        use arbitrary::{Arbitrary, Unstructured};
14314        let mut buf = [0u8; 1024];
14315        rng.fill_bytes(&mut buf);
14316        let mut unstructured = Unstructured::new(&buf);
14317        Self::arbitrary(&mut unstructured).unwrap_or_default()
14318    }
14319}
14320impl Default for GIMBAL_MANAGER_STATUS_DATA {
14321    fn default() -> Self {
14322        Self::DEFAULT.clone()
14323    }
14324}
14325impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14326    type Message = MavMessage;
14327    const ID: u32 = 281u32;
14328    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14329    const EXTRA_CRC: u8 = 48u8;
14330    const ENCODED_LEN: usize = 13usize;
14331    fn deser(
14332        _version: MavlinkVersion,
14333        __input: &[u8],
14334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14335        let avail_len = __input.len();
14336        let mut payload_buf = [0; Self::ENCODED_LEN];
14337        let mut buf = if avail_len < Self::ENCODED_LEN {
14338            payload_buf[0..avail_len].copy_from_slice(__input);
14339            Bytes::new(&payload_buf)
14340        } else {
14341            Bytes::new(__input)
14342        };
14343        let mut __struct = Self::default();
14344        __struct.time_boot_ms = buf.get_u32_le();
14345        let tmp = buf.get_u32_le();
14346        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14347            ::mavlink_core::error::ParserError::InvalidFlag {
14348                flag_type: "GimbalManagerFlags",
14349                value: tmp as u64,
14350            },
14351        )?;
14352        __struct.gimbal_device_id = buf.get_u8();
14353        __struct.primary_control_sysid = buf.get_u8();
14354        __struct.primary_control_compid = buf.get_u8();
14355        __struct.secondary_control_sysid = buf.get_u8();
14356        __struct.secondary_control_compid = buf.get_u8();
14357        Ok(__struct)
14358    }
14359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14360        let mut __tmp = BytesMut::new(bytes);
14361        #[allow(clippy::absurd_extreme_comparisons)]
14362        #[allow(unused_comparisons)]
14363        if __tmp.remaining() < Self::ENCODED_LEN {
14364            panic!(
14365                "buffer is too small (need {} bytes, but got {})",
14366                Self::ENCODED_LEN,
14367                __tmp.remaining(),
14368            )
14369        }
14370        __tmp.put_u32_le(self.time_boot_ms);
14371        __tmp.put_u32_le(self.flags.bits());
14372        __tmp.put_u8(self.gimbal_device_id);
14373        __tmp.put_u8(self.primary_control_sysid);
14374        __tmp.put_u8(self.primary_control_compid);
14375        __tmp.put_u8(self.secondary_control_sysid);
14376        __tmp.put_u8(self.secondary_control_compid);
14377        if matches!(version, MavlinkVersion::V2) {
14378            let len = __tmp.len();
14379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14380        } else {
14381            __tmp.len()
14382        }
14383    }
14384}
14385#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14386#[doc = ""]
14387#[doc = "ID: 33"]
14388#[derive(Debug, Clone, PartialEq)]
14389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14391#[cfg_attr(feature = "ts", derive(TS))]
14392#[cfg_attr(feature = "ts", ts(export))]
14393pub struct GLOBAL_POSITION_INT_DATA {
14394    #[doc = "Timestamp (time since system boot)."]
14395    pub time_boot_ms: u32,
14396    #[doc = "Latitude, expressed"]
14397    pub lat: i32,
14398    #[doc = "Longitude, expressed"]
14399    pub lon: i32,
14400    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14401    pub alt: i32,
14402    #[doc = "Altitude above home"]
14403    pub relative_alt: i32,
14404    #[doc = "Ground X Speed (Latitude, positive north)"]
14405    pub vx: i16,
14406    #[doc = "Ground Y Speed (Longitude, positive east)"]
14407    pub vy: i16,
14408    #[doc = "Ground Z Speed (Altitude, positive down)"]
14409    pub vz: i16,
14410    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14411    pub hdg: u16,
14412}
14413impl GLOBAL_POSITION_INT_DATA {
14414    pub const ENCODED_LEN: usize = 28usize;
14415    pub const DEFAULT: Self = Self {
14416        time_boot_ms: 0_u32,
14417        lat: 0_i32,
14418        lon: 0_i32,
14419        alt: 0_i32,
14420        relative_alt: 0_i32,
14421        vx: 0_i16,
14422        vy: 0_i16,
14423        vz: 0_i16,
14424        hdg: 0_u16,
14425    };
14426    #[cfg(feature = "arbitrary")]
14427    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14428        use arbitrary::{Arbitrary, Unstructured};
14429        let mut buf = [0u8; 1024];
14430        rng.fill_bytes(&mut buf);
14431        let mut unstructured = Unstructured::new(&buf);
14432        Self::arbitrary(&mut unstructured).unwrap_or_default()
14433    }
14434}
14435impl Default for GLOBAL_POSITION_INT_DATA {
14436    fn default() -> Self {
14437        Self::DEFAULT.clone()
14438    }
14439}
14440impl MessageData for GLOBAL_POSITION_INT_DATA {
14441    type Message = MavMessage;
14442    const ID: u32 = 33u32;
14443    const NAME: &'static str = "GLOBAL_POSITION_INT";
14444    const EXTRA_CRC: u8 = 104u8;
14445    const ENCODED_LEN: usize = 28usize;
14446    fn deser(
14447        _version: MavlinkVersion,
14448        __input: &[u8],
14449    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14450        let avail_len = __input.len();
14451        let mut payload_buf = [0; Self::ENCODED_LEN];
14452        let mut buf = if avail_len < Self::ENCODED_LEN {
14453            payload_buf[0..avail_len].copy_from_slice(__input);
14454            Bytes::new(&payload_buf)
14455        } else {
14456            Bytes::new(__input)
14457        };
14458        let mut __struct = Self::default();
14459        __struct.time_boot_ms = buf.get_u32_le();
14460        __struct.lat = buf.get_i32_le();
14461        __struct.lon = buf.get_i32_le();
14462        __struct.alt = buf.get_i32_le();
14463        __struct.relative_alt = buf.get_i32_le();
14464        __struct.vx = buf.get_i16_le();
14465        __struct.vy = buf.get_i16_le();
14466        __struct.vz = buf.get_i16_le();
14467        __struct.hdg = buf.get_u16_le();
14468        Ok(__struct)
14469    }
14470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14471        let mut __tmp = BytesMut::new(bytes);
14472        #[allow(clippy::absurd_extreme_comparisons)]
14473        #[allow(unused_comparisons)]
14474        if __tmp.remaining() < Self::ENCODED_LEN {
14475            panic!(
14476                "buffer is too small (need {} bytes, but got {})",
14477                Self::ENCODED_LEN,
14478                __tmp.remaining(),
14479            )
14480        }
14481        __tmp.put_u32_le(self.time_boot_ms);
14482        __tmp.put_i32_le(self.lat);
14483        __tmp.put_i32_le(self.lon);
14484        __tmp.put_i32_le(self.alt);
14485        __tmp.put_i32_le(self.relative_alt);
14486        __tmp.put_i16_le(self.vx);
14487        __tmp.put_i16_le(self.vy);
14488        __tmp.put_i16_le(self.vz);
14489        __tmp.put_u16_le(self.hdg);
14490        if matches!(version, MavlinkVersion::V2) {
14491            let len = __tmp.len();
14492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14493        } else {
14494            __tmp.len()
14495        }
14496    }
14497}
14498#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14499#[doc = ""]
14500#[doc = "ID: 63"]
14501#[derive(Debug, Clone, PartialEq)]
14502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14504#[cfg_attr(feature = "ts", derive(TS))]
14505#[cfg_attr(feature = "ts", ts(export))]
14506pub struct GLOBAL_POSITION_INT_COV_DATA {
14507    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14508    pub time_usec: u64,
14509    #[doc = "Latitude"]
14510    pub lat: i32,
14511    #[doc = "Longitude"]
14512    pub lon: i32,
14513    #[doc = "Altitude in meters above MSL"]
14514    pub alt: i32,
14515    #[doc = "Altitude above ground"]
14516    pub relative_alt: i32,
14517    #[doc = "Ground X Speed (Latitude)"]
14518    pub vx: f32,
14519    #[doc = "Ground Y Speed (Longitude)"]
14520    pub vy: f32,
14521    #[doc = "Ground Z Speed (Altitude)"]
14522    pub vz: f32,
14523    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14526    pub covariance: [f32; 36],
14527    #[doc = "Class id of the estimator this estimate originated from."]
14528    pub estimator_type: MavEstimatorType,
14529}
14530impl GLOBAL_POSITION_INT_COV_DATA {
14531    pub const ENCODED_LEN: usize = 181usize;
14532    pub const DEFAULT: Self = Self {
14533        time_usec: 0_u64,
14534        lat: 0_i32,
14535        lon: 0_i32,
14536        alt: 0_i32,
14537        relative_alt: 0_i32,
14538        vx: 0.0_f32,
14539        vy: 0.0_f32,
14540        vz: 0.0_f32,
14541        covariance: [0.0_f32; 36usize],
14542        estimator_type: MavEstimatorType::DEFAULT,
14543    };
14544    #[cfg(feature = "arbitrary")]
14545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14546        use arbitrary::{Arbitrary, Unstructured};
14547        let mut buf = [0u8; 1024];
14548        rng.fill_bytes(&mut buf);
14549        let mut unstructured = Unstructured::new(&buf);
14550        Self::arbitrary(&mut unstructured).unwrap_or_default()
14551    }
14552}
14553impl Default for GLOBAL_POSITION_INT_COV_DATA {
14554    fn default() -> Self {
14555        Self::DEFAULT.clone()
14556    }
14557}
14558impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14559    type Message = MavMessage;
14560    const ID: u32 = 63u32;
14561    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14562    const EXTRA_CRC: u8 = 119u8;
14563    const ENCODED_LEN: usize = 181usize;
14564    fn deser(
14565        _version: MavlinkVersion,
14566        __input: &[u8],
14567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14568        let avail_len = __input.len();
14569        let mut payload_buf = [0; Self::ENCODED_LEN];
14570        let mut buf = if avail_len < Self::ENCODED_LEN {
14571            payload_buf[0..avail_len].copy_from_slice(__input);
14572            Bytes::new(&payload_buf)
14573        } else {
14574            Bytes::new(__input)
14575        };
14576        let mut __struct = Self::default();
14577        __struct.time_usec = buf.get_u64_le();
14578        __struct.lat = buf.get_i32_le();
14579        __struct.lon = buf.get_i32_le();
14580        __struct.alt = buf.get_i32_le();
14581        __struct.relative_alt = buf.get_i32_le();
14582        __struct.vx = buf.get_f32_le();
14583        __struct.vy = buf.get_f32_le();
14584        __struct.vz = buf.get_f32_le();
14585        for v in &mut __struct.covariance {
14586            let val = buf.get_f32_le();
14587            *v = val;
14588        }
14589        let tmp = buf.get_u8();
14590        __struct.estimator_type =
14591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14592                enum_type: "MavEstimatorType",
14593                value: tmp as u64,
14594            })?;
14595        Ok(__struct)
14596    }
14597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14598        let mut __tmp = BytesMut::new(bytes);
14599        #[allow(clippy::absurd_extreme_comparisons)]
14600        #[allow(unused_comparisons)]
14601        if __tmp.remaining() < Self::ENCODED_LEN {
14602            panic!(
14603                "buffer is too small (need {} bytes, but got {})",
14604                Self::ENCODED_LEN,
14605                __tmp.remaining(),
14606            )
14607        }
14608        __tmp.put_u64_le(self.time_usec);
14609        __tmp.put_i32_le(self.lat);
14610        __tmp.put_i32_le(self.lon);
14611        __tmp.put_i32_le(self.alt);
14612        __tmp.put_i32_le(self.relative_alt);
14613        __tmp.put_f32_le(self.vx);
14614        __tmp.put_f32_le(self.vy);
14615        __tmp.put_f32_le(self.vz);
14616        for val in &self.covariance {
14617            __tmp.put_f32_le(*val);
14618        }
14619        __tmp.put_u8(self.estimator_type as u8);
14620        if matches!(version, MavlinkVersion::V2) {
14621            let len = __tmp.len();
14622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14623        } else {
14624            __tmp.len()
14625        }
14626    }
14627}
14628#[doc = "Global position/attitude estimate from a vision source."]
14629#[doc = ""]
14630#[doc = "ID: 101"]
14631#[derive(Debug, Clone, PartialEq)]
14632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14634#[cfg_attr(feature = "ts", derive(TS))]
14635#[cfg_attr(feature = "ts", ts(export))]
14636pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14637    #[doc = "Timestamp (UNIX time or since system boot)"]
14638    pub usec: u64,
14639    #[doc = "Global X position"]
14640    pub x: f32,
14641    #[doc = "Global Y position"]
14642    pub y: f32,
14643    #[doc = "Global Z position"]
14644    pub z: f32,
14645    #[doc = "Roll angle"]
14646    pub roll: f32,
14647    #[doc = "Pitch angle"]
14648    pub pitch: f32,
14649    #[doc = "Yaw angle"]
14650    pub yaw: f32,
14651    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14655    pub covariance: [f32; 21],
14656    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14658    pub reset_counter: u8,
14659}
14660impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14661    pub const ENCODED_LEN: usize = 117usize;
14662    pub const DEFAULT: Self = Self {
14663        usec: 0_u64,
14664        x: 0.0_f32,
14665        y: 0.0_f32,
14666        z: 0.0_f32,
14667        roll: 0.0_f32,
14668        pitch: 0.0_f32,
14669        yaw: 0.0_f32,
14670        covariance: [0.0_f32; 21usize],
14671        reset_counter: 0_u8,
14672    };
14673    #[cfg(feature = "arbitrary")]
14674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14675        use arbitrary::{Arbitrary, Unstructured};
14676        let mut buf = [0u8; 1024];
14677        rng.fill_bytes(&mut buf);
14678        let mut unstructured = Unstructured::new(&buf);
14679        Self::arbitrary(&mut unstructured).unwrap_or_default()
14680    }
14681}
14682impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14683    fn default() -> Self {
14684        Self::DEFAULT.clone()
14685    }
14686}
14687impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14688    type Message = MavMessage;
14689    const ID: u32 = 101u32;
14690    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14691    const EXTRA_CRC: u8 = 102u8;
14692    const ENCODED_LEN: usize = 117usize;
14693    fn deser(
14694        _version: MavlinkVersion,
14695        __input: &[u8],
14696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14697        let avail_len = __input.len();
14698        let mut payload_buf = [0; Self::ENCODED_LEN];
14699        let mut buf = if avail_len < Self::ENCODED_LEN {
14700            payload_buf[0..avail_len].copy_from_slice(__input);
14701            Bytes::new(&payload_buf)
14702        } else {
14703            Bytes::new(__input)
14704        };
14705        let mut __struct = Self::default();
14706        __struct.usec = buf.get_u64_le();
14707        __struct.x = buf.get_f32_le();
14708        __struct.y = buf.get_f32_le();
14709        __struct.z = buf.get_f32_le();
14710        __struct.roll = buf.get_f32_le();
14711        __struct.pitch = buf.get_f32_le();
14712        __struct.yaw = buf.get_f32_le();
14713        for v in &mut __struct.covariance {
14714            let val = buf.get_f32_le();
14715            *v = val;
14716        }
14717        __struct.reset_counter = buf.get_u8();
14718        Ok(__struct)
14719    }
14720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14721        let mut __tmp = BytesMut::new(bytes);
14722        #[allow(clippy::absurd_extreme_comparisons)]
14723        #[allow(unused_comparisons)]
14724        if __tmp.remaining() < Self::ENCODED_LEN {
14725            panic!(
14726                "buffer is too small (need {} bytes, but got {})",
14727                Self::ENCODED_LEN,
14728                __tmp.remaining(),
14729            )
14730        }
14731        __tmp.put_u64_le(self.usec);
14732        __tmp.put_f32_le(self.x);
14733        __tmp.put_f32_le(self.y);
14734        __tmp.put_f32_le(self.z);
14735        __tmp.put_f32_le(self.roll);
14736        __tmp.put_f32_le(self.pitch);
14737        __tmp.put_f32_le(self.yaw);
14738        if matches!(version, MavlinkVersion::V2) {
14739            for val in &self.covariance {
14740                __tmp.put_f32_le(*val);
14741            }
14742            __tmp.put_u8(self.reset_counter);
14743            let len = __tmp.len();
14744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14745        } else {
14746            __tmp.len()
14747        }
14748    }
14749}
14750#[doc = "Second GPS data."]
14751#[doc = ""]
14752#[doc = "ID: 124"]
14753#[derive(Debug, Clone, PartialEq)]
14754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14756#[cfg_attr(feature = "ts", derive(TS))]
14757#[cfg_attr(feature = "ts", ts(export))]
14758pub struct GPS2_RAW_DATA {
14759    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14760    pub time_usec: u64,
14761    #[doc = "Latitude (WGS84)"]
14762    pub lat: i32,
14763    #[doc = "Longitude (WGS84)"]
14764    pub lon: i32,
14765    #[doc = "Altitude (MSL). Positive for up."]
14766    pub alt: i32,
14767    #[doc = "Age of DGPS info"]
14768    pub dgps_age: u32,
14769    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14770    pub eph: u16,
14771    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14772    pub epv: u16,
14773    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14774    pub vel: u16,
14775    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14776    pub cog: u16,
14777    #[doc = "GPS fix type."]
14778    pub fix_type: GpsFixType,
14779    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14780    pub satellites_visible: u8,
14781    #[doc = "Number of DGPS satellites"]
14782    pub dgps_numch: u8,
14783    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14785    pub yaw: u16,
14786    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14788    pub alt_ellipsoid: i32,
14789    #[doc = "Position uncertainty."]
14790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14791    pub h_acc: u32,
14792    #[doc = "Altitude uncertainty."]
14793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14794    pub v_acc: u32,
14795    #[doc = "Speed uncertainty."]
14796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14797    pub vel_acc: u32,
14798    #[doc = "Heading / track uncertainty"]
14799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14800    pub hdg_acc: u32,
14801}
14802impl GPS2_RAW_DATA {
14803    pub const ENCODED_LEN: usize = 57usize;
14804    pub const DEFAULT: Self = Self {
14805        time_usec: 0_u64,
14806        lat: 0_i32,
14807        lon: 0_i32,
14808        alt: 0_i32,
14809        dgps_age: 0_u32,
14810        eph: 0_u16,
14811        epv: 0_u16,
14812        vel: 0_u16,
14813        cog: 0_u16,
14814        fix_type: GpsFixType::DEFAULT,
14815        satellites_visible: 0_u8,
14816        dgps_numch: 0_u8,
14817        yaw: 0_u16,
14818        alt_ellipsoid: 0_i32,
14819        h_acc: 0_u32,
14820        v_acc: 0_u32,
14821        vel_acc: 0_u32,
14822        hdg_acc: 0_u32,
14823    };
14824    #[cfg(feature = "arbitrary")]
14825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14826        use arbitrary::{Arbitrary, Unstructured};
14827        let mut buf = [0u8; 1024];
14828        rng.fill_bytes(&mut buf);
14829        let mut unstructured = Unstructured::new(&buf);
14830        Self::arbitrary(&mut unstructured).unwrap_or_default()
14831    }
14832}
14833impl Default for GPS2_RAW_DATA {
14834    fn default() -> Self {
14835        Self::DEFAULT.clone()
14836    }
14837}
14838impl MessageData for GPS2_RAW_DATA {
14839    type Message = MavMessage;
14840    const ID: u32 = 124u32;
14841    const NAME: &'static str = "GPS2_RAW";
14842    const EXTRA_CRC: u8 = 87u8;
14843    const ENCODED_LEN: usize = 57usize;
14844    fn deser(
14845        _version: MavlinkVersion,
14846        __input: &[u8],
14847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14848        let avail_len = __input.len();
14849        let mut payload_buf = [0; Self::ENCODED_LEN];
14850        let mut buf = if avail_len < Self::ENCODED_LEN {
14851            payload_buf[0..avail_len].copy_from_slice(__input);
14852            Bytes::new(&payload_buf)
14853        } else {
14854            Bytes::new(__input)
14855        };
14856        let mut __struct = Self::default();
14857        __struct.time_usec = buf.get_u64_le();
14858        __struct.lat = buf.get_i32_le();
14859        __struct.lon = buf.get_i32_le();
14860        __struct.alt = buf.get_i32_le();
14861        __struct.dgps_age = buf.get_u32_le();
14862        __struct.eph = buf.get_u16_le();
14863        __struct.epv = buf.get_u16_le();
14864        __struct.vel = buf.get_u16_le();
14865        __struct.cog = buf.get_u16_le();
14866        let tmp = buf.get_u8();
14867        __struct.fix_type =
14868            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14869                enum_type: "GpsFixType",
14870                value: tmp as u64,
14871            })?;
14872        __struct.satellites_visible = buf.get_u8();
14873        __struct.dgps_numch = buf.get_u8();
14874        __struct.yaw = buf.get_u16_le();
14875        __struct.alt_ellipsoid = buf.get_i32_le();
14876        __struct.h_acc = buf.get_u32_le();
14877        __struct.v_acc = buf.get_u32_le();
14878        __struct.vel_acc = buf.get_u32_le();
14879        __struct.hdg_acc = buf.get_u32_le();
14880        Ok(__struct)
14881    }
14882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14883        let mut __tmp = BytesMut::new(bytes);
14884        #[allow(clippy::absurd_extreme_comparisons)]
14885        #[allow(unused_comparisons)]
14886        if __tmp.remaining() < Self::ENCODED_LEN {
14887            panic!(
14888                "buffer is too small (need {} bytes, but got {})",
14889                Self::ENCODED_LEN,
14890                __tmp.remaining(),
14891            )
14892        }
14893        __tmp.put_u64_le(self.time_usec);
14894        __tmp.put_i32_le(self.lat);
14895        __tmp.put_i32_le(self.lon);
14896        __tmp.put_i32_le(self.alt);
14897        __tmp.put_u32_le(self.dgps_age);
14898        __tmp.put_u16_le(self.eph);
14899        __tmp.put_u16_le(self.epv);
14900        __tmp.put_u16_le(self.vel);
14901        __tmp.put_u16_le(self.cog);
14902        __tmp.put_u8(self.fix_type as u8);
14903        __tmp.put_u8(self.satellites_visible);
14904        __tmp.put_u8(self.dgps_numch);
14905        if matches!(version, MavlinkVersion::V2) {
14906            __tmp.put_u16_le(self.yaw);
14907            __tmp.put_i32_le(self.alt_ellipsoid);
14908            __tmp.put_u32_le(self.h_acc);
14909            __tmp.put_u32_le(self.v_acc);
14910            __tmp.put_u32_le(self.vel_acc);
14911            __tmp.put_u32_le(self.hdg_acc);
14912            let len = __tmp.len();
14913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14914        } else {
14915            __tmp.len()
14916        }
14917    }
14918}
14919#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14920#[doc = ""]
14921#[doc = "ID: 128"]
14922#[derive(Debug, Clone, PartialEq)]
14923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14925#[cfg_attr(feature = "ts", derive(TS))]
14926#[cfg_attr(feature = "ts", ts(export))]
14927pub struct GPS2_RTK_DATA {
14928    #[doc = "Time since boot of last baseline message received."]
14929    pub time_last_baseline_ms: u32,
14930    #[doc = "GPS Time of Week of last baseline"]
14931    pub tow: u32,
14932    #[doc = "Current baseline in ECEF x or NED north component."]
14933    pub baseline_a_mm: i32,
14934    #[doc = "Current baseline in ECEF y or NED east component."]
14935    pub baseline_b_mm: i32,
14936    #[doc = "Current baseline in ECEF z or NED down component."]
14937    pub baseline_c_mm: i32,
14938    #[doc = "Current estimate of baseline accuracy."]
14939    pub accuracy: u32,
14940    #[doc = "Current number of integer ambiguity hypotheses."]
14941    pub iar_num_hypotheses: i32,
14942    #[doc = "GPS Week Number of last baseline"]
14943    pub wn: u16,
14944    #[doc = "Identification of connected RTK receiver."]
14945    pub rtk_receiver_id: u8,
14946    #[doc = "GPS-specific health report for RTK data."]
14947    pub rtk_health: u8,
14948    #[doc = "Rate of baseline messages being received by GPS"]
14949    pub rtk_rate: u8,
14950    #[doc = "Current number of sats used for RTK calculation."]
14951    pub nsats: u8,
14952    #[doc = "Coordinate system of baseline"]
14953    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14954}
14955impl GPS2_RTK_DATA {
14956    pub const ENCODED_LEN: usize = 35usize;
14957    pub const DEFAULT: Self = Self {
14958        time_last_baseline_ms: 0_u32,
14959        tow: 0_u32,
14960        baseline_a_mm: 0_i32,
14961        baseline_b_mm: 0_i32,
14962        baseline_c_mm: 0_i32,
14963        accuracy: 0_u32,
14964        iar_num_hypotheses: 0_i32,
14965        wn: 0_u16,
14966        rtk_receiver_id: 0_u8,
14967        rtk_health: 0_u8,
14968        rtk_rate: 0_u8,
14969        nsats: 0_u8,
14970        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14971    };
14972    #[cfg(feature = "arbitrary")]
14973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14974        use arbitrary::{Arbitrary, Unstructured};
14975        let mut buf = [0u8; 1024];
14976        rng.fill_bytes(&mut buf);
14977        let mut unstructured = Unstructured::new(&buf);
14978        Self::arbitrary(&mut unstructured).unwrap_or_default()
14979    }
14980}
14981impl Default for GPS2_RTK_DATA {
14982    fn default() -> Self {
14983        Self::DEFAULT.clone()
14984    }
14985}
14986impl MessageData for GPS2_RTK_DATA {
14987    type Message = MavMessage;
14988    const ID: u32 = 128u32;
14989    const NAME: &'static str = "GPS2_RTK";
14990    const EXTRA_CRC: u8 = 226u8;
14991    const ENCODED_LEN: usize = 35usize;
14992    fn deser(
14993        _version: MavlinkVersion,
14994        __input: &[u8],
14995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14996        let avail_len = __input.len();
14997        let mut payload_buf = [0; Self::ENCODED_LEN];
14998        let mut buf = if avail_len < Self::ENCODED_LEN {
14999            payload_buf[0..avail_len].copy_from_slice(__input);
15000            Bytes::new(&payload_buf)
15001        } else {
15002            Bytes::new(__input)
15003        };
15004        let mut __struct = Self::default();
15005        __struct.time_last_baseline_ms = buf.get_u32_le();
15006        __struct.tow = buf.get_u32_le();
15007        __struct.baseline_a_mm = buf.get_i32_le();
15008        __struct.baseline_b_mm = buf.get_i32_le();
15009        __struct.baseline_c_mm = buf.get_i32_le();
15010        __struct.accuracy = buf.get_u32_le();
15011        __struct.iar_num_hypotheses = buf.get_i32_le();
15012        __struct.wn = buf.get_u16_le();
15013        __struct.rtk_receiver_id = buf.get_u8();
15014        __struct.rtk_health = buf.get_u8();
15015        __struct.rtk_rate = buf.get_u8();
15016        __struct.nsats = buf.get_u8();
15017        let tmp = buf.get_u8();
15018        __struct.baseline_coords_type =
15019            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15020                enum_type: "RtkBaselineCoordinateSystem",
15021                value: tmp as u64,
15022            })?;
15023        Ok(__struct)
15024    }
15025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15026        let mut __tmp = BytesMut::new(bytes);
15027        #[allow(clippy::absurd_extreme_comparisons)]
15028        #[allow(unused_comparisons)]
15029        if __tmp.remaining() < Self::ENCODED_LEN {
15030            panic!(
15031                "buffer is too small (need {} bytes, but got {})",
15032                Self::ENCODED_LEN,
15033                __tmp.remaining(),
15034            )
15035        }
15036        __tmp.put_u32_le(self.time_last_baseline_ms);
15037        __tmp.put_u32_le(self.tow);
15038        __tmp.put_i32_le(self.baseline_a_mm);
15039        __tmp.put_i32_le(self.baseline_b_mm);
15040        __tmp.put_i32_le(self.baseline_c_mm);
15041        __tmp.put_u32_le(self.accuracy);
15042        __tmp.put_i32_le(self.iar_num_hypotheses);
15043        __tmp.put_u16_le(self.wn);
15044        __tmp.put_u8(self.rtk_receiver_id);
15045        __tmp.put_u8(self.rtk_health);
15046        __tmp.put_u8(self.rtk_rate);
15047        __tmp.put_u8(self.nsats);
15048        __tmp.put_u8(self.baseline_coords_type as u8);
15049        if matches!(version, MavlinkVersion::V2) {
15050            let len = __tmp.len();
15051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15052        } else {
15053            __tmp.len()
15054        }
15055    }
15056}
15057#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
15058#[doc = ""]
15059#[doc = "ID: 49"]
15060#[derive(Debug, Clone, PartialEq)]
15061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15063#[cfg_attr(feature = "ts", derive(TS))]
15064#[cfg_attr(feature = "ts", ts(export))]
15065pub struct GPS_GLOBAL_ORIGIN_DATA {
15066    #[doc = "Latitude (WGS84)"]
15067    pub latitude: i32,
15068    #[doc = "Longitude (WGS84)"]
15069    pub longitude: i32,
15070    #[doc = "Altitude (MSL). Positive for up."]
15071    pub altitude: i32,
15072    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15073    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15074    pub time_usec: u64,
15075}
15076impl GPS_GLOBAL_ORIGIN_DATA {
15077    pub const ENCODED_LEN: usize = 20usize;
15078    pub const DEFAULT: Self = Self {
15079        latitude: 0_i32,
15080        longitude: 0_i32,
15081        altitude: 0_i32,
15082        time_usec: 0_u64,
15083    };
15084    #[cfg(feature = "arbitrary")]
15085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15086        use arbitrary::{Arbitrary, Unstructured};
15087        let mut buf = [0u8; 1024];
15088        rng.fill_bytes(&mut buf);
15089        let mut unstructured = Unstructured::new(&buf);
15090        Self::arbitrary(&mut unstructured).unwrap_or_default()
15091    }
15092}
15093impl Default for GPS_GLOBAL_ORIGIN_DATA {
15094    fn default() -> Self {
15095        Self::DEFAULT.clone()
15096    }
15097}
15098impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
15099    type Message = MavMessage;
15100    const ID: u32 = 49u32;
15101    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
15102    const EXTRA_CRC: u8 = 39u8;
15103    const ENCODED_LEN: usize = 20usize;
15104    fn deser(
15105        _version: MavlinkVersion,
15106        __input: &[u8],
15107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15108        let avail_len = __input.len();
15109        let mut payload_buf = [0; Self::ENCODED_LEN];
15110        let mut buf = if avail_len < Self::ENCODED_LEN {
15111            payload_buf[0..avail_len].copy_from_slice(__input);
15112            Bytes::new(&payload_buf)
15113        } else {
15114            Bytes::new(__input)
15115        };
15116        let mut __struct = Self::default();
15117        __struct.latitude = buf.get_i32_le();
15118        __struct.longitude = buf.get_i32_le();
15119        __struct.altitude = buf.get_i32_le();
15120        __struct.time_usec = buf.get_u64_le();
15121        Ok(__struct)
15122    }
15123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15124        let mut __tmp = BytesMut::new(bytes);
15125        #[allow(clippy::absurd_extreme_comparisons)]
15126        #[allow(unused_comparisons)]
15127        if __tmp.remaining() < Self::ENCODED_LEN {
15128            panic!(
15129                "buffer is too small (need {} bytes, but got {})",
15130                Self::ENCODED_LEN,
15131                __tmp.remaining(),
15132            )
15133        }
15134        __tmp.put_i32_le(self.latitude);
15135        __tmp.put_i32_le(self.longitude);
15136        __tmp.put_i32_le(self.altitude);
15137        if matches!(version, MavlinkVersion::V2) {
15138            __tmp.put_u64_le(self.time_usec);
15139            let len = __tmp.len();
15140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15141        } else {
15142            __tmp.len()
15143        }
15144    }
15145}
15146#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
15147#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
15148#[doc = ""]
15149#[doc = "ID: 123"]
15150#[derive(Debug, Clone, PartialEq)]
15151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15153#[cfg_attr(feature = "ts", derive(TS))]
15154#[cfg_attr(feature = "ts", ts(export))]
15155pub struct GPS_INJECT_DATA_DATA {
15156    #[doc = "System ID"]
15157    pub target_system: u8,
15158    #[doc = "Component ID"]
15159    pub target_component: u8,
15160    #[doc = "Data length"]
15161    pub len: u8,
15162    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
15163    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15164    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15165    pub data: [u8; 110],
15166}
15167impl GPS_INJECT_DATA_DATA {
15168    pub const ENCODED_LEN: usize = 113usize;
15169    pub const DEFAULT: Self = Self {
15170        target_system: 0_u8,
15171        target_component: 0_u8,
15172        len: 0_u8,
15173        data: [0_u8; 110usize],
15174    };
15175    #[cfg(feature = "arbitrary")]
15176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15177        use arbitrary::{Arbitrary, Unstructured};
15178        let mut buf = [0u8; 1024];
15179        rng.fill_bytes(&mut buf);
15180        let mut unstructured = Unstructured::new(&buf);
15181        Self::arbitrary(&mut unstructured).unwrap_or_default()
15182    }
15183}
15184impl Default for GPS_INJECT_DATA_DATA {
15185    fn default() -> Self {
15186        Self::DEFAULT.clone()
15187    }
15188}
15189impl MessageData for GPS_INJECT_DATA_DATA {
15190    type Message = MavMessage;
15191    const ID: u32 = 123u32;
15192    const NAME: &'static str = "GPS_INJECT_DATA";
15193    const EXTRA_CRC: u8 = 250u8;
15194    const ENCODED_LEN: usize = 113usize;
15195    fn deser(
15196        _version: MavlinkVersion,
15197        __input: &[u8],
15198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15199        let avail_len = __input.len();
15200        let mut payload_buf = [0; Self::ENCODED_LEN];
15201        let mut buf = if avail_len < Self::ENCODED_LEN {
15202            payload_buf[0..avail_len].copy_from_slice(__input);
15203            Bytes::new(&payload_buf)
15204        } else {
15205            Bytes::new(__input)
15206        };
15207        let mut __struct = Self::default();
15208        __struct.target_system = buf.get_u8();
15209        __struct.target_component = buf.get_u8();
15210        __struct.len = buf.get_u8();
15211        for v in &mut __struct.data {
15212            let val = buf.get_u8();
15213            *v = val;
15214        }
15215        Ok(__struct)
15216    }
15217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15218        let mut __tmp = BytesMut::new(bytes);
15219        #[allow(clippy::absurd_extreme_comparisons)]
15220        #[allow(unused_comparisons)]
15221        if __tmp.remaining() < Self::ENCODED_LEN {
15222            panic!(
15223                "buffer is too small (need {} bytes, but got {})",
15224                Self::ENCODED_LEN,
15225                __tmp.remaining(),
15226            )
15227        }
15228        __tmp.put_u8(self.target_system);
15229        __tmp.put_u8(self.target_component);
15230        __tmp.put_u8(self.len);
15231        for val in &self.data {
15232            __tmp.put_u8(*val);
15233        }
15234        if matches!(version, MavlinkVersion::V2) {
15235            let len = __tmp.len();
15236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15237        } else {
15238            __tmp.len()
15239        }
15240    }
15241}
15242#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15243#[doc = ""]
15244#[doc = "ID: 232"]
15245#[derive(Debug, Clone, PartialEq)]
15246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15248#[cfg_attr(feature = "ts", derive(TS))]
15249#[cfg_attr(feature = "ts", ts(export))]
15250pub struct GPS_INPUT_DATA {
15251    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15252    pub time_usec: u64,
15253    #[doc = "GPS time (from start of GPS week)"]
15254    pub time_week_ms: u32,
15255    #[doc = "Latitude (WGS84)"]
15256    pub lat: i32,
15257    #[doc = "Longitude (WGS84)"]
15258    pub lon: i32,
15259    #[doc = "Altitude (MSL). Positive for up."]
15260    pub alt: f32,
15261    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15262    pub hdop: f32,
15263    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15264    pub vdop: f32,
15265    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15266    pub vn: f32,
15267    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15268    pub ve: f32,
15269    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15270    pub vd: f32,
15271    #[doc = "GPS speed accuracy"]
15272    pub speed_accuracy: f32,
15273    #[doc = "GPS horizontal accuracy"]
15274    pub horiz_accuracy: f32,
15275    #[doc = "GPS vertical accuracy"]
15276    pub vert_accuracy: f32,
15277    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15278    pub ignore_flags: GpsInputIgnoreFlags,
15279    #[doc = "GPS week number"]
15280    pub time_week: u16,
15281    #[doc = "ID of the GPS for multiple GPS inputs"]
15282    pub gps_id: u8,
15283    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15284    pub fix_type: u8,
15285    #[doc = "Number of satellites visible."]
15286    pub satellites_visible: u8,
15287    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15288    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15289    pub yaw: u16,
15290}
15291impl GPS_INPUT_DATA {
15292    pub const ENCODED_LEN: usize = 65usize;
15293    pub const DEFAULT: Self = Self {
15294        time_usec: 0_u64,
15295        time_week_ms: 0_u32,
15296        lat: 0_i32,
15297        lon: 0_i32,
15298        alt: 0.0_f32,
15299        hdop: 0.0_f32,
15300        vdop: 0.0_f32,
15301        vn: 0.0_f32,
15302        ve: 0.0_f32,
15303        vd: 0.0_f32,
15304        speed_accuracy: 0.0_f32,
15305        horiz_accuracy: 0.0_f32,
15306        vert_accuracy: 0.0_f32,
15307        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15308        time_week: 0_u16,
15309        gps_id: 0_u8,
15310        fix_type: 0_u8,
15311        satellites_visible: 0_u8,
15312        yaw: 0_u16,
15313    };
15314    #[cfg(feature = "arbitrary")]
15315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15316        use arbitrary::{Arbitrary, Unstructured};
15317        let mut buf = [0u8; 1024];
15318        rng.fill_bytes(&mut buf);
15319        let mut unstructured = Unstructured::new(&buf);
15320        Self::arbitrary(&mut unstructured).unwrap_or_default()
15321    }
15322}
15323impl Default for GPS_INPUT_DATA {
15324    fn default() -> Self {
15325        Self::DEFAULT.clone()
15326    }
15327}
15328impl MessageData for GPS_INPUT_DATA {
15329    type Message = MavMessage;
15330    const ID: u32 = 232u32;
15331    const NAME: &'static str = "GPS_INPUT";
15332    const EXTRA_CRC: u8 = 151u8;
15333    const ENCODED_LEN: usize = 65usize;
15334    fn deser(
15335        _version: MavlinkVersion,
15336        __input: &[u8],
15337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15338        let avail_len = __input.len();
15339        let mut payload_buf = [0; Self::ENCODED_LEN];
15340        let mut buf = if avail_len < Self::ENCODED_LEN {
15341            payload_buf[0..avail_len].copy_from_slice(__input);
15342            Bytes::new(&payload_buf)
15343        } else {
15344            Bytes::new(__input)
15345        };
15346        let mut __struct = Self::default();
15347        __struct.time_usec = buf.get_u64_le();
15348        __struct.time_week_ms = buf.get_u32_le();
15349        __struct.lat = buf.get_i32_le();
15350        __struct.lon = buf.get_i32_le();
15351        __struct.alt = buf.get_f32_le();
15352        __struct.hdop = buf.get_f32_le();
15353        __struct.vdop = buf.get_f32_le();
15354        __struct.vn = buf.get_f32_le();
15355        __struct.ve = buf.get_f32_le();
15356        __struct.vd = buf.get_f32_le();
15357        __struct.speed_accuracy = buf.get_f32_le();
15358        __struct.horiz_accuracy = buf.get_f32_le();
15359        __struct.vert_accuracy = buf.get_f32_le();
15360        let tmp = buf.get_u16_le();
15361        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(tmp).ok_or(
15362            ::mavlink_core::error::ParserError::InvalidFlag {
15363                flag_type: "GpsInputIgnoreFlags",
15364                value: tmp as u64,
15365            },
15366        )?;
15367        __struct.time_week = buf.get_u16_le();
15368        __struct.gps_id = buf.get_u8();
15369        __struct.fix_type = buf.get_u8();
15370        __struct.satellites_visible = buf.get_u8();
15371        __struct.yaw = buf.get_u16_le();
15372        Ok(__struct)
15373    }
15374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15375        let mut __tmp = BytesMut::new(bytes);
15376        #[allow(clippy::absurd_extreme_comparisons)]
15377        #[allow(unused_comparisons)]
15378        if __tmp.remaining() < Self::ENCODED_LEN {
15379            panic!(
15380                "buffer is too small (need {} bytes, but got {})",
15381                Self::ENCODED_LEN,
15382                __tmp.remaining(),
15383            )
15384        }
15385        __tmp.put_u64_le(self.time_usec);
15386        __tmp.put_u32_le(self.time_week_ms);
15387        __tmp.put_i32_le(self.lat);
15388        __tmp.put_i32_le(self.lon);
15389        __tmp.put_f32_le(self.alt);
15390        __tmp.put_f32_le(self.hdop);
15391        __tmp.put_f32_le(self.vdop);
15392        __tmp.put_f32_le(self.vn);
15393        __tmp.put_f32_le(self.ve);
15394        __tmp.put_f32_le(self.vd);
15395        __tmp.put_f32_le(self.speed_accuracy);
15396        __tmp.put_f32_le(self.horiz_accuracy);
15397        __tmp.put_f32_le(self.vert_accuracy);
15398        __tmp.put_u16_le(self.ignore_flags.bits());
15399        __tmp.put_u16_le(self.time_week);
15400        __tmp.put_u8(self.gps_id);
15401        __tmp.put_u8(self.fix_type);
15402        __tmp.put_u8(self.satellites_visible);
15403        if matches!(version, MavlinkVersion::V2) {
15404            __tmp.put_u16_le(self.yaw);
15405            let len = __tmp.len();
15406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15407        } else {
15408            __tmp.len()
15409        }
15410    }
15411}
15412#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15413#[doc = ""]
15414#[doc = "ID: 24"]
15415#[derive(Debug, Clone, PartialEq)]
15416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15418#[cfg_attr(feature = "ts", derive(TS))]
15419#[cfg_attr(feature = "ts", ts(export))]
15420pub struct GPS_RAW_INT_DATA {
15421    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15422    pub time_usec: u64,
15423    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15424    pub lat: i32,
15425    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15426    pub lon: i32,
15427    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15428    pub alt: i32,
15429    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15430    pub eph: u16,
15431    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15432    pub epv: u16,
15433    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15434    pub vel: u16,
15435    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15436    pub cog: u16,
15437    #[doc = "GPS fix type."]
15438    pub fix_type: GpsFixType,
15439    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15440    pub satellites_visible: u8,
15441    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15443    pub alt_ellipsoid: i32,
15444    #[doc = "Position uncertainty."]
15445    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15446    pub h_acc: u32,
15447    #[doc = "Altitude uncertainty."]
15448    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15449    pub v_acc: u32,
15450    #[doc = "Speed uncertainty."]
15451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15452    pub vel_acc: u32,
15453    #[doc = "Heading / track uncertainty"]
15454    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15455    pub hdg_acc: u32,
15456    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15458    pub yaw: u16,
15459}
15460impl GPS_RAW_INT_DATA {
15461    pub const ENCODED_LEN: usize = 52usize;
15462    pub const DEFAULT: Self = Self {
15463        time_usec: 0_u64,
15464        lat: 0_i32,
15465        lon: 0_i32,
15466        alt: 0_i32,
15467        eph: 0_u16,
15468        epv: 0_u16,
15469        vel: 0_u16,
15470        cog: 0_u16,
15471        fix_type: GpsFixType::DEFAULT,
15472        satellites_visible: 0_u8,
15473        alt_ellipsoid: 0_i32,
15474        h_acc: 0_u32,
15475        v_acc: 0_u32,
15476        vel_acc: 0_u32,
15477        hdg_acc: 0_u32,
15478        yaw: 0_u16,
15479    };
15480    #[cfg(feature = "arbitrary")]
15481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15482        use arbitrary::{Arbitrary, Unstructured};
15483        let mut buf = [0u8; 1024];
15484        rng.fill_bytes(&mut buf);
15485        let mut unstructured = Unstructured::new(&buf);
15486        Self::arbitrary(&mut unstructured).unwrap_or_default()
15487    }
15488}
15489impl Default for GPS_RAW_INT_DATA {
15490    fn default() -> Self {
15491        Self::DEFAULT.clone()
15492    }
15493}
15494impl MessageData for GPS_RAW_INT_DATA {
15495    type Message = MavMessage;
15496    const ID: u32 = 24u32;
15497    const NAME: &'static str = "GPS_RAW_INT";
15498    const EXTRA_CRC: u8 = 24u8;
15499    const ENCODED_LEN: usize = 52usize;
15500    fn deser(
15501        _version: MavlinkVersion,
15502        __input: &[u8],
15503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15504        let avail_len = __input.len();
15505        let mut payload_buf = [0; Self::ENCODED_LEN];
15506        let mut buf = if avail_len < Self::ENCODED_LEN {
15507            payload_buf[0..avail_len].copy_from_slice(__input);
15508            Bytes::new(&payload_buf)
15509        } else {
15510            Bytes::new(__input)
15511        };
15512        let mut __struct = Self::default();
15513        __struct.time_usec = buf.get_u64_le();
15514        __struct.lat = buf.get_i32_le();
15515        __struct.lon = buf.get_i32_le();
15516        __struct.alt = buf.get_i32_le();
15517        __struct.eph = buf.get_u16_le();
15518        __struct.epv = buf.get_u16_le();
15519        __struct.vel = buf.get_u16_le();
15520        __struct.cog = buf.get_u16_le();
15521        let tmp = buf.get_u8();
15522        __struct.fix_type =
15523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15524                enum_type: "GpsFixType",
15525                value: tmp as u64,
15526            })?;
15527        __struct.satellites_visible = buf.get_u8();
15528        __struct.alt_ellipsoid = buf.get_i32_le();
15529        __struct.h_acc = buf.get_u32_le();
15530        __struct.v_acc = buf.get_u32_le();
15531        __struct.vel_acc = buf.get_u32_le();
15532        __struct.hdg_acc = buf.get_u32_le();
15533        __struct.yaw = buf.get_u16_le();
15534        Ok(__struct)
15535    }
15536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15537        let mut __tmp = BytesMut::new(bytes);
15538        #[allow(clippy::absurd_extreme_comparisons)]
15539        #[allow(unused_comparisons)]
15540        if __tmp.remaining() < Self::ENCODED_LEN {
15541            panic!(
15542                "buffer is too small (need {} bytes, but got {})",
15543                Self::ENCODED_LEN,
15544                __tmp.remaining(),
15545            )
15546        }
15547        __tmp.put_u64_le(self.time_usec);
15548        __tmp.put_i32_le(self.lat);
15549        __tmp.put_i32_le(self.lon);
15550        __tmp.put_i32_le(self.alt);
15551        __tmp.put_u16_le(self.eph);
15552        __tmp.put_u16_le(self.epv);
15553        __tmp.put_u16_le(self.vel);
15554        __tmp.put_u16_le(self.cog);
15555        __tmp.put_u8(self.fix_type as u8);
15556        __tmp.put_u8(self.satellites_visible);
15557        if matches!(version, MavlinkVersion::V2) {
15558            __tmp.put_i32_le(self.alt_ellipsoid);
15559            __tmp.put_u32_le(self.h_acc);
15560            __tmp.put_u32_le(self.v_acc);
15561            __tmp.put_u32_le(self.vel_acc);
15562            __tmp.put_u32_le(self.hdg_acc);
15563            __tmp.put_u16_le(self.yaw);
15564            let len = __tmp.len();
15565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15566        } else {
15567            __tmp.len()
15568        }
15569    }
15570}
15571#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15572#[doc = ""]
15573#[doc = "ID: 233"]
15574#[derive(Debug, Clone, PartialEq)]
15575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15577#[cfg_attr(feature = "ts", derive(TS))]
15578#[cfg_attr(feature = "ts", ts(export))]
15579pub struct GPS_RTCM_DATA_DATA {
15580    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15581    pub flags: u8,
15582    #[doc = "data length"]
15583    pub len: u8,
15584    #[doc = "RTCM message (may be fragmented)"]
15585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15587    pub data: [u8; 180],
15588}
15589impl GPS_RTCM_DATA_DATA {
15590    pub const ENCODED_LEN: usize = 182usize;
15591    pub const DEFAULT: Self = Self {
15592        flags: 0_u8,
15593        len: 0_u8,
15594        data: [0_u8; 180usize],
15595    };
15596    #[cfg(feature = "arbitrary")]
15597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15598        use arbitrary::{Arbitrary, Unstructured};
15599        let mut buf = [0u8; 1024];
15600        rng.fill_bytes(&mut buf);
15601        let mut unstructured = Unstructured::new(&buf);
15602        Self::arbitrary(&mut unstructured).unwrap_or_default()
15603    }
15604}
15605impl Default for GPS_RTCM_DATA_DATA {
15606    fn default() -> Self {
15607        Self::DEFAULT.clone()
15608    }
15609}
15610impl MessageData for GPS_RTCM_DATA_DATA {
15611    type Message = MavMessage;
15612    const ID: u32 = 233u32;
15613    const NAME: &'static str = "GPS_RTCM_DATA";
15614    const EXTRA_CRC: u8 = 35u8;
15615    const ENCODED_LEN: usize = 182usize;
15616    fn deser(
15617        _version: MavlinkVersion,
15618        __input: &[u8],
15619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15620        let avail_len = __input.len();
15621        let mut payload_buf = [0; Self::ENCODED_LEN];
15622        let mut buf = if avail_len < Self::ENCODED_LEN {
15623            payload_buf[0..avail_len].copy_from_slice(__input);
15624            Bytes::new(&payload_buf)
15625        } else {
15626            Bytes::new(__input)
15627        };
15628        let mut __struct = Self::default();
15629        __struct.flags = buf.get_u8();
15630        __struct.len = buf.get_u8();
15631        for v in &mut __struct.data {
15632            let val = buf.get_u8();
15633            *v = val;
15634        }
15635        Ok(__struct)
15636    }
15637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15638        let mut __tmp = BytesMut::new(bytes);
15639        #[allow(clippy::absurd_extreme_comparisons)]
15640        #[allow(unused_comparisons)]
15641        if __tmp.remaining() < Self::ENCODED_LEN {
15642            panic!(
15643                "buffer is too small (need {} bytes, but got {})",
15644                Self::ENCODED_LEN,
15645                __tmp.remaining(),
15646            )
15647        }
15648        __tmp.put_u8(self.flags);
15649        __tmp.put_u8(self.len);
15650        for val in &self.data {
15651            __tmp.put_u8(*val);
15652        }
15653        if matches!(version, MavlinkVersion::V2) {
15654            let len = __tmp.len();
15655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15656        } else {
15657            __tmp.len()
15658        }
15659    }
15660}
15661#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15662#[doc = ""]
15663#[doc = "ID: 127"]
15664#[derive(Debug, Clone, PartialEq)]
15665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15667#[cfg_attr(feature = "ts", derive(TS))]
15668#[cfg_attr(feature = "ts", ts(export))]
15669pub struct GPS_RTK_DATA {
15670    #[doc = "Time since boot of last baseline message received."]
15671    pub time_last_baseline_ms: u32,
15672    #[doc = "GPS Time of Week of last baseline"]
15673    pub tow: u32,
15674    #[doc = "Current baseline in ECEF x or NED north component."]
15675    pub baseline_a_mm: i32,
15676    #[doc = "Current baseline in ECEF y or NED east component."]
15677    pub baseline_b_mm: i32,
15678    #[doc = "Current baseline in ECEF z or NED down component."]
15679    pub baseline_c_mm: i32,
15680    #[doc = "Current estimate of baseline accuracy."]
15681    pub accuracy: u32,
15682    #[doc = "Current number of integer ambiguity hypotheses."]
15683    pub iar_num_hypotheses: i32,
15684    #[doc = "GPS Week Number of last baseline"]
15685    pub wn: u16,
15686    #[doc = "Identification of connected RTK receiver."]
15687    pub rtk_receiver_id: u8,
15688    #[doc = "GPS-specific health report for RTK data."]
15689    pub rtk_health: u8,
15690    #[doc = "Rate of baseline messages being received by GPS"]
15691    pub rtk_rate: u8,
15692    #[doc = "Current number of sats used for RTK calculation."]
15693    pub nsats: u8,
15694    #[doc = "Coordinate system of baseline"]
15695    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15696}
15697impl GPS_RTK_DATA {
15698    pub const ENCODED_LEN: usize = 35usize;
15699    pub const DEFAULT: Self = Self {
15700        time_last_baseline_ms: 0_u32,
15701        tow: 0_u32,
15702        baseline_a_mm: 0_i32,
15703        baseline_b_mm: 0_i32,
15704        baseline_c_mm: 0_i32,
15705        accuracy: 0_u32,
15706        iar_num_hypotheses: 0_i32,
15707        wn: 0_u16,
15708        rtk_receiver_id: 0_u8,
15709        rtk_health: 0_u8,
15710        rtk_rate: 0_u8,
15711        nsats: 0_u8,
15712        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15713    };
15714    #[cfg(feature = "arbitrary")]
15715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15716        use arbitrary::{Arbitrary, Unstructured};
15717        let mut buf = [0u8; 1024];
15718        rng.fill_bytes(&mut buf);
15719        let mut unstructured = Unstructured::new(&buf);
15720        Self::arbitrary(&mut unstructured).unwrap_or_default()
15721    }
15722}
15723impl Default for GPS_RTK_DATA {
15724    fn default() -> Self {
15725        Self::DEFAULT.clone()
15726    }
15727}
15728impl MessageData for GPS_RTK_DATA {
15729    type Message = MavMessage;
15730    const ID: u32 = 127u32;
15731    const NAME: &'static str = "GPS_RTK";
15732    const EXTRA_CRC: u8 = 25u8;
15733    const ENCODED_LEN: usize = 35usize;
15734    fn deser(
15735        _version: MavlinkVersion,
15736        __input: &[u8],
15737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15738        let avail_len = __input.len();
15739        let mut payload_buf = [0; Self::ENCODED_LEN];
15740        let mut buf = if avail_len < Self::ENCODED_LEN {
15741            payload_buf[0..avail_len].copy_from_slice(__input);
15742            Bytes::new(&payload_buf)
15743        } else {
15744            Bytes::new(__input)
15745        };
15746        let mut __struct = Self::default();
15747        __struct.time_last_baseline_ms = buf.get_u32_le();
15748        __struct.tow = buf.get_u32_le();
15749        __struct.baseline_a_mm = buf.get_i32_le();
15750        __struct.baseline_b_mm = buf.get_i32_le();
15751        __struct.baseline_c_mm = buf.get_i32_le();
15752        __struct.accuracy = buf.get_u32_le();
15753        __struct.iar_num_hypotheses = buf.get_i32_le();
15754        __struct.wn = buf.get_u16_le();
15755        __struct.rtk_receiver_id = buf.get_u8();
15756        __struct.rtk_health = buf.get_u8();
15757        __struct.rtk_rate = buf.get_u8();
15758        __struct.nsats = buf.get_u8();
15759        let tmp = buf.get_u8();
15760        __struct.baseline_coords_type =
15761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15762                enum_type: "RtkBaselineCoordinateSystem",
15763                value: tmp as u64,
15764            })?;
15765        Ok(__struct)
15766    }
15767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15768        let mut __tmp = BytesMut::new(bytes);
15769        #[allow(clippy::absurd_extreme_comparisons)]
15770        #[allow(unused_comparisons)]
15771        if __tmp.remaining() < Self::ENCODED_LEN {
15772            panic!(
15773                "buffer is too small (need {} bytes, but got {})",
15774                Self::ENCODED_LEN,
15775                __tmp.remaining(),
15776            )
15777        }
15778        __tmp.put_u32_le(self.time_last_baseline_ms);
15779        __tmp.put_u32_le(self.tow);
15780        __tmp.put_i32_le(self.baseline_a_mm);
15781        __tmp.put_i32_le(self.baseline_b_mm);
15782        __tmp.put_i32_le(self.baseline_c_mm);
15783        __tmp.put_u32_le(self.accuracy);
15784        __tmp.put_i32_le(self.iar_num_hypotheses);
15785        __tmp.put_u16_le(self.wn);
15786        __tmp.put_u8(self.rtk_receiver_id);
15787        __tmp.put_u8(self.rtk_health);
15788        __tmp.put_u8(self.rtk_rate);
15789        __tmp.put_u8(self.nsats);
15790        __tmp.put_u8(self.baseline_coords_type as u8);
15791        if matches!(version, MavlinkVersion::V2) {
15792            let len = __tmp.len();
15793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15794        } else {
15795            __tmp.len()
15796        }
15797    }
15798}
15799#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15800#[doc = ""]
15801#[doc = "ID: 25"]
15802#[derive(Debug, Clone, PartialEq)]
15803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15805#[cfg_attr(feature = "ts", derive(TS))]
15806#[cfg_attr(feature = "ts", ts(export))]
15807pub struct GPS_STATUS_DATA {
15808    #[doc = "Number of satellites visible"]
15809    pub satellites_visible: u8,
15810    #[doc = "Global satellite ID"]
15811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15812    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15813    pub satellite_prn: [u8; 20],
15814    #[doc = "0: Satellite not used, 1: used for localization"]
15815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15817    pub satellite_used: [u8; 20],
15818    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15820    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15821    pub satellite_elevation: [u8; 20],
15822    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15825    pub satellite_azimuth: [u8; 20],
15826    #[doc = "Signal to noise ratio of satellite"]
15827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15829    pub satellite_snr: [u8; 20],
15830}
15831impl GPS_STATUS_DATA {
15832    pub const ENCODED_LEN: usize = 101usize;
15833    pub const DEFAULT: Self = Self {
15834        satellites_visible: 0_u8,
15835        satellite_prn: [0_u8; 20usize],
15836        satellite_used: [0_u8; 20usize],
15837        satellite_elevation: [0_u8; 20usize],
15838        satellite_azimuth: [0_u8; 20usize],
15839        satellite_snr: [0_u8; 20usize],
15840    };
15841    #[cfg(feature = "arbitrary")]
15842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15843        use arbitrary::{Arbitrary, Unstructured};
15844        let mut buf = [0u8; 1024];
15845        rng.fill_bytes(&mut buf);
15846        let mut unstructured = Unstructured::new(&buf);
15847        Self::arbitrary(&mut unstructured).unwrap_or_default()
15848    }
15849}
15850impl Default for GPS_STATUS_DATA {
15851    fn default() -> Self {
15852        Self::DEFAULT.clone()
15853    }
15854}
15855impl MessageData for GPS_STATUS_DATA {
15856    type Message = MavMessage;
15857    const ID: u32 = 25u32;
15858    const NAME: &'static str = "GPS_STATUS";
15859    const EXTRA_CRC: u8 = 23u8;
15860    const ENCODED_LEN: usize = 101usize;
15861    fn deser(
15862        _version: MavlinkVersion,
15863        __input: &[u8],
15864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15865        let avail_len = __input.len();
15866        let mut payload_buf = [0; Self::ENCODED_LEN];
15867        let mut buf = if avail_len < Self::ENCODED_LEN {
15868            payload_buf[0..avail_len].copy_from_slice(__input);
15869            Bytes::new(&payload_buf)
15870        } else {
15871            Bytes::new(__input)
15872        };
15873        let mut __struct = Self::default();
15874        __struct.satellites_visible = buf.get_u8();
15875        for v in &mut __struct.satellite_prn {
15876            let val = buf.get_u8();
15877            *v = val;
15878        }
15879        for v in &mut __struct.satellite_used {
15880            let val = buf.get_u8();
15881            *v = val;
15882        }
15883        for v in &mut __struct.satellite_elevation {
15884            let val = buf.get_u8();
15885            *v = val;
15886        }
15887        for v in &mut __struct.satellite_azimuth {
15888            let val = buf.get_u8();
15889            *v = val;
15890        }
15891        for v in &mut __struct.satellite_snr {
15892            let val = buf.get_u8();
15893            *v = val;
15894        }
15895        Ok(__struct)
15896    }
15897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15898        let mut __tmp = BytesMut::new(bytes);
15899        #[allow(clippy::absurd_extreme_comparisons)]
15900        #[allow(unused_comparisons)]
15901        if __tmp.remaining() < Self::ENCODED_LEN {
15902            panic!(
15903                "buffer is too small (need {} bytes, but got {})",
15904                Self::ENCODED_LEN,
15905                __tmp.remaining(),
15906            )
15907        }
15908        __tmp.put_u8(self.satellites_visible);
15909        for val in &self.satellite_prn {
15910            __tmp.put_u8(*val);
15911        }
15912        for val in &self.satellite_used {
15913            __tmp.put_u8(*val);
15914        }
15915        for val in &self.satellite_elevation {
15916            __tmp.put_u8(*val);
15917        }
15918        for val in &self.satellite_azimuth {
15919            __tmp.put_u8(*val);
15920        }
15921        for val in &self.satellite_snr {
15922            __tmp.put_u8(*val);
15923        }
15924        if matches!(version, MavlinkVersion::V2) {
15925            let len = __tmp.len();
15926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15927        } else {
15928            __tmp.len()
15929        }
15930    }
15931}
15932#[doc = "Status of GSM modem (connected to onboard computer)."]
15933#[doc = ""]
15934#[doc = "ID: 8014"]
15935#[derive(Debug, Clone, PartialEq)]
15936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15938#[cfg_attr(feature = "ts", derive(TS))]
15939#[cfg_attr(feature = "ts", ts(export))]
15940pub struct GSM_LINK_STATUS_DATA {
15941    #[doc = "Timestamp (of OBC)"]
15942    pub timestamp: u64,
15943    #[doc = "GSM modem used"]
15944    pub gsm_modem_type: GsmModemType,
15945    #[doc = "GSM link type"]
15946    pub gsm_link_type: GsmLinkType,
15947    #[doc = "RSSI as reported by modem (unconverted)"]
15948    pub rssi: u8,
15949    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
15950    pub rsrp_rscp: u8,
15951    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
15952    pub sinr_ecio: u8,
15953    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
15954    pub rsrq: u8,
15955}
15956impl GSM_LINK_STATUS_DATA {
15957    pub const ENCODED_LEN: usize = 14usize;
15958    pub const DEFAULT: Self = Self {
15959        timestamp: 0_u64,
15960        gsm_modem_type: GsmModemType::DEFAULT,
15961        gsm_link_type: GsmLinkType::DEFAULT,
15962        rssi: 0_u8,
15963        rsrp_rscp: 0_u8,
15964        sinr_ecio: 0_u8,
15965        rsrq: 0_u8,
15966    };
15967    #[cfg(feature = "arbitrary")]
15968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15969        use arbitrary::{Arbitrary, Unstructured};
15970        let mut buf = [0u8; 1024];
15971        rng.fill_bytes(&mut buf);
15972        let mut unstructured = Unstructured::new(&buf);
15973        Self::arbitrary(&mut unstructured).unwrap_or_default()
15974    }
15975}
15976impl Default for GSM_LINK_STATUS_DATA {
15977    fn default() -> Self {
15978        Self::DEFAULT.clone()
15979    }
15980}
15981impl MessageData for GSM_LINK_STATUS_DATA {
15982    type Message = MavMessage;
15983    const ID: u32 = 8014u32;
15984    const NAME: &'static str = "GSM_LINK_STATUS";
15985    const EXTRA_CRC: u8 = 200u8;
15986    const ENCODED_LEN: usize = 14usize;
15987    fn deser(
15988        _version: MavlinkVersion,
15989        __input: &[u8],
15990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15991        let avail_len = __input.len();
15992        let mut payload_buf = [0; Self::ENCODED_LEN];
15993        let mut buf = if avail_len < Self::ENCODED_LEN {
15994            payload_buf[0..avail_len].copy_from_slice(__input);
15995            Bytes::new(&payload_buf)
15996        } else {
15997            Bytes::new(__input)
15998        };
15999        let mut __struct = Self::default();
16000        __struct.timestamp = buf.get_u64_le();
16001        let tmp = buf.get_u8();
16002        __struct.gsm_modem_type =
16003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16004                enum_type: "GsmModemType",
16005                value: tmp as u64,
16006            })?;
16007        let tmp = buf.get_u8();
16008        __struct.gsm_link_type =
16009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16010                enum_type: "GsmLinkType",
16011                value: tmp as u64,
16012            })?;
16013        __struct.rssi = buf.get_u8();
16014        __struct.rsrp_rscp = buf.get_u8();
16015        __struct.sinr_ecio = buf.get_u8();
16016        __struct.rsrq = buf.get_u8();
16017        Ok(__struct)
16018    }
16019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16020        let mut __tmp = BytesMut::new(bytes);
16021        #[allow(clippy::absurd_extreme_comparisons)]
16022        #[allow(unused_comparisons)]
16023        if __tmp.remaining() < Self::ENCODED_LEN {
16024            panic!(
16025                "buffer is too small (need {} bytes, but got {})",
16026                Self::ENCODED_LEN,
16027                __tmp.remaining(),
16028            )
16029        }
16030        __tmp.put_u64_le(self.timestamp);
16031        __tmp.put_u8(self.gsm_modem_type as u8);
16032        __tmp.put_u8(self.gsm_link_type as u8);
16033        __tmp.put_u8(self.rssi);
16034        __tmp.put_u8(self.rsrp_rscp);
16035        __tmp.put_u8(self.sinr_ecio);
16036        __tmp.put_u8(self.rsrq);
16037        if matches!(version, MavlinkVersion::V2) {
16038            let len = __tmp.len();
16039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16040        } else {
16041            __tmp.len()
16042        }
16043    }
16044}
16045#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
16046#[doc = ""]
16047#[doc = "ID: 0"]
16048#[derive(Debug, Clone, PartialEq)]
16049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16051#[cfg_attr(feature = "ts", derive(TS))]
16052#[cfg_attr(feature = "ts", ts(export))]
16053pub struct HEARTBEAT_DATA {
16054    #[doc = "A bitfield for use for autopilot-specific flags"]
16055    pub custom_mode: u32,
16056    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
16057    pub mavtype: MavType,
16058    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16059    pub autopilot: MavAutopilot,
16060    #[doc = "System mode bitmap."]
16061    pub base_mode: MavModeFlag,
16062    #[doc = "System status flag."]
16063    pub system_status: MavState,
16064    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
16065    pub mavlink_version: u8,
16066}
16067impl HEARTBEAT_DATA {
16068    pub const ENCODED_LEN: usize = 9usize;
16069    pub const DEFAULT: Self = Self {
16070        custom_mode: 0_u32,
16071        mavtype: MavType::DEFAULT,
16072        autopilot: MavAutopilot::DEFAULT,
16073        base_mode: MavModeFlag::DEFAULT,
16074        system_status: MavState::DEFAULT,
16075        mavlink_version: MINOR_MAVLINK_VERSION,
16076    };
16077    #[cfg(feature = "arbitrary")]
16078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16079        use arbitrary::{Arbitrary, Unstructured};
16080        let mut buf = [0u8; 1024];
16081        rng.fill_bytes(&mut buf);
16082        let mut unstructured = Unstructured::new(&buf);
16083        Self::arbitrary(&mut unstructured).unwrap_or_default()
16084    }
16085}
16086impl Default for HEARTBEAT_DATA {
16087    fn default() -> Self {
16088        Self::DEFAULT.clone()
16089    }
16090}
16091impl MessageData for HEARTBEAT_DATA {
16092    type Message = MavMessage;
16093    const ID: u32 = 0u32;
16094    const NAME: &'static str = "HEARTBEAT";
16095    const EXTRA_CRC: u8 = 50u8;
16096    const ENCODED_LEN: usize = 9usize;
16097    fn deser(
16098        _version: MavlinkVersion,
16099        __input: &[u8],
16100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16101        let avail_len = __input.len();
16102        let mut payload_buf = [0; Self::ENCODED_LEN];
16103        let mut buf = if avail_len < Self::ENCODED_LEN {
16104            payload_buf[0..avail_len].copy_from_slice(__input);
16105            Bytes::new(&payload_buf)
16106        } else {
16107            Bytes::new(__input)
16108        };
16109        let mut __struct = Self::default();
16110        __struct.custom_mode = buf.get_u32_le();
16111        let tmp = buf.get_u8();
16112        __struct.mavtype =
16113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16114                enum_type: "MavType",
16115                value: tmp as u64,
16116            })?;
16117        let tmp = buf.get_u8();
16118        __struct.autopilot =
16119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16120                enum_type: "MavAutopilot",
16121                value: tmp as u64,
16122            })?;
16123        let tmp = buf.get_u8();
16124        __struct.base_mode =
16125            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16126                flag_type: "MavModeFlag",
16127                value: tmp as u64,
16128            })?;
16129        let tmp = buf.get_u8();
16130        __struct.system_status =
16131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16132                enum_type: "MavState",
16133                value: tmp as u64,
16134            })?;
16135        __struct.mavlink_version = buf.get_u8();
16136        Ok(__struct)
16137    }
16138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16139        let mut __tmp = BytesMut::new(bytes);
16140        #[allow(clippy::absurd_extreme_comparisons)]
16141        #[allow(unused_comparisons)]
16142        if __tmp.remaining() < Self::ENCODED_LEN {
16143            panic!(
16144                "buffer is too small (need {} bytes, but got {})",
16145                Self::ENCODED_LEN,
16146                __tmp.remaining(),
16147            )
16148        }
16149        __tmp.put_u32_le(self.custom_mode);
16150        __tmp.put_u8(self.mavtype as u8);
16151        __tmp.put_u8(self.autopilot as u8);
16152        __tmp.put_u8(self.base_mode.bits());
16153        __tmp.put_u8(self.system_status as u8);
16154        __tmp.put_u8(self.mavlink_version);
16155        if matches!(version, MavlinkVersion::V2) {
16156            let len = __tmp.len();
16157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16158        } else {
16159            __tmp.len()
16160        }
16161    }
16162}
16163#[doc = "The IMU readings in SI units in NED body frame."]
16164#[doc = ""]
16165#[doc = "ID: 105"]
16166#[derive(Debug, Clone, PartialEq)]
16167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16169#[cfg_attr(feature = "ts", derive(TS))]
16170#[cfg_attr(feature = "ts", ts(export))]
16171pub struct HIGHRES_IMU_DATA {
16172    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16173    pub time_usec: u64,
16174    #[doc = "X acceleration"]
16175    pub xacc: f32,
16176    #[doc = "Y acceleration"]
16177    pub yacc: f32,
16178    #[doc = "Z acceleration"]
16179    pub zacc: f32,
16180    #[doc = "Angular speed around X axis"]
16181    pub xgyro: f32,
16182    #[doc = "Angular speed around Y axis"]
16183    pub ygyro: f32,
16184    #[doc = "Angular speed around Z axis"]
16185    pub zgyro: f32,
16186    #[doc = "X Magnetic field"]
16187    pub xmag: f32,
16188    #[doc = "Y Magnetic field"]
16189    pub ymag: f32,
16190    #[doc = "Z Magnetic field"]
16191    pub zmag: f32,
16192    #[doc = "Absolute pressure"]
16193    pub abs_pressure: f32,
16194    #[doc = "Differential pressure"]
16195    pub diff_pressure: f32,
16196    #[doc = "Altitude calculated from pressure"]
16197    pub pressure_alt: f32,
16198    #[doc = "Temperature"]
16199    pub temperature: f32,
16200    #[doc = "Bitmap for fields that have updated since last message"]
16201    pub fields_updated: HighresImuUpdatedFlags,
16202    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
16203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16204    pub id: u8,
16205}
16206impl HIGHRES_IMU_DATA {
16207    pub const ENCODED_LEN: usize = 63usize;
16208    pub const DEFAULT: Self = Self {
16209        time_usec: 0_u64,
16210        xacc: 0.0_f32,
16211        yacc: 0.0_f32,
16212        zacc: 0.0_f32,
16213        xgyro: 0.0_f32,
16214        ygyro: 0.0_f32,
16215        zgyro: 0.0_f32,
16216        xmag: 0.0_f32,
16217        ymag: 0.0_f32,
16218        zmag: 0.0_f32,
16219        abs_pressure: 0.0_f32,
16220        diff_pressure: 0.0_f32,
16221        pressure_alt: 0.0_f32,
16222        temperature: 0.0_f32,
16223        fields_updated: HighresImuUpdatedFlags::DEFAULT,
16224        id: 0_u8,
16225    };
16226    #[cfg(feature = "arbitrary")]
16227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16228        use arbitrary::{Arbitrary, Unstructured};
16229        let mut buf = [0u8; 1024];
16230        rng.fill_bytes(&mut buf);
16231        let mut unstructured = Unstructured::new(&buf);
16232        Self::arbitrary(&mut unstructured).unwrap_or_default()
16233    }
16234}
16235impl Default for HIGHRES_IMU_DATA {
16236    fn default() -> Self {
16237        Self::DEFAULT.clone()
16238    }
16239}
16240impl MessageData for HIGHRES_IMU_DATA {
16241    type Message = MavMessage;
16242    const ID: u32 = 105u32;
16243    const NAME: &'static str = "HIGHRES_IMU";
16244    const EXTRA_CRC: u8 = 93u8;
16245    const ENCODED_LEN: usize = 63usize;
16246    fn deser(
16247        _version: MavlinkVersion,
16248        __input: &[u8],
16249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16250        let avail_len = __input.len();
16251        let mut payload_buf = [0; Self::ENCODED_LEN];
16252        let mut buf = if avail_len < Self::ENCODED_LEN {
16253            payload_buf[0..avail_len].copy_from_slice(__input);
16254            Bytes::new(&payload_buf)
16255        } else {
16256            Bytes::new(__input)
16257        };
16258        let mut __struct = Self::default();
16259        __struct.time_usec = buf.get_u64_le();
16260        __struct.xacc = buf.get_f32_le();
16261        __struct.yacc = buf.get_f32_le();
16262        __struct.zacc = buf.get_f32_le();
16263        __struct.xgyro = buf.get_f32_le();
16264        __struct.ygyro = buf.get_f32_le();
16265        __struct.zgyro = buf.get_f32_le();
16266        __struct.xmag = buf.get_f32_le();
16267        __struct.ymag = buf.get_f32_le();
16268        __struct.zmag = buf.get_f32_le();
16269        __struct.abs_pressure = buf.get_f32_le();
16270        __struct.diff_pressure = buf.get_f32_le();
16271        __struct.pressure_alt = buf.get_f32_le();
16272        __struct.temperature = buf.get_f32_le();
16273        let tmp = buf.get_u16_le();
16274        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(tmp).ok_or(
16275            ::mavlink_core::error::ParserError::InvalidFlag {
16276                flag_type: "HighresImuUpdatedFlags",
16277                value: tmp as u64,
16278            },
16279        )?;
16280        __struct.id = buf.get_u8();
16281        Ok(__struct)
16282    }
16283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16284        let mut __tmp = BytesMut::new(bytes);
16285        #[allow(clippy::absurd_extreme_comparisons)]
16286        #[allow(unused_comparisons)]
16287        if __tmp.remaining() < Self::ENCODED_LEN {
16288            panic!(
16289                "buffer is too small (need {} bytes, but got {})",
16290                Self::ENCODED_LEN,
16291                __tmp.remaining(),
16292            )
16293        }
16294        __tmp.put_u64_le(self.time_usec);
16295        __tmp.put_f32_le(self.xacc);
16296        __tmp.put_f32_le(self.yacc);
16297        __tmp.put_f32_le(self.zacc);
16298        __tmp.put_f32_le(self.xgyro);
16299        __tmp.put_f32_le(self.ygyro);
16300        __tmp.put_f32_le(self.zgyro);
16301        __tmp.put_f32_le(self.xmag);
16302        __tmp.put_f32_le(self.ymag);
16303        __tmp.put_f32_le(self.zmag);
16304        __tmp.put_f32_le(self.abs_pressure);
16305        __tmp.put_f32_le(self.diff_pressure);
16306        __tmp.put_f32_le(self.pressure_alt);
16307        __tmp.put_f32_le(self.temperature);
16308        __tmp.put_u16_le(self.fields_updated.bits());
16309        if matches!(version, MavlinkVersion::V2) {
16310            __tmp.put_u8(self.id);
16311            let len = __tmp.len();
16312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16313        } else {
16314            __tmp.len()
16315        }
16316    }
16317}
16318#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16319#[doc = "Message appropriate for high latency connections like Iridium."]
16320#[doc = ""]
16321#[doc = "ID: 234"]
16322#[derive(Debug, Clone, PartialEq)]
16323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16325#[cfg_attr(feature = "ts", derive(TS))]
16326#[cfg_attr(feature = "ts", ts(export))]
16327pub struct HIGH_LATENCY_DATA {
16328    #[doc = "A bitfield for use for autopilot-specific flags."]
16329    pub custom_mode: u32,
16330    #[doc = "Latitude"]
16331    pub latitude: i32,
16332    #[doc = "Longitude"]
16333    pub longitude: i32,
16334    #[doc = "roll"]
16335    pub roll: i16,
16336    #[doc = "pitch"]
16337    pub pitch: i16,
16338    #[doc = "heading"]
16339    pub heading: u16,
16340    #[doc = "heading setpoint"]
16341    pub heading_sp: i16,
16342    #[doc = "Altitude above mean sea level"]
16343    pub altitude_amsl: i16,
16344    #[doc = "Altitude setpoint relative to the home position"]
16345    pub altitude_sp: i16,
16346    #[doc = "distance to target"]
16347    pub wp_distance: u16,
16348    #[doc = "Bitmap of enabled system modes."]
16349    pub base_mode: MavModeFlag,
16350    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16351    pub landed_state: MavLandedState,
16352    #[doc = "throttle (percentage)"]
16353    pub throttle: i8,
16354    #[doc = "airspeed"]
16355    pub airspeed: u8,
16356    #[doc = "airspeed setpoint"]
16357    pub airspeed_sp: u8,
16358    #[doc = "groundspeed"]
16359    pub groundspeed: u8,
16360    #[doc = "climb rate"]
16361    pub climb_rate: i8,
16362    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16363    pub gps_nsat: u8,
16364    #[doc = "GPS Fix type."]
16365    pub gps_fix_type: GpsFixType,
16366    #[doc = "Remaining battery (percentage)"]
16367    pub battery_remaining: u8,
16368    #[doc = "Autopilot temperature (degrees C)"]
16369    pub temperature: i8,
16370    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16371    pub temperature_air: i8,
16372    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16373    pub failsafe: u8,
16374    #[doc = "current waypoint number"]
16375    pub wp_num: u8,
16376}
16377impl HIGH_LATENCY_DATA {
16378    pub const ENCODED_LEN: usize = 40usize;
16379    pub const DEFAULT: Self = Self {
16380        custom_mode: 0_u32,
16381        latitude: 0_i32,
16382        longitude: 0_i32,
16383        roll: 0_i16,
16384        pitch: 0_i16,
16385        heading: 0_u16,
16386        heading_sp: 0_i16,
16387        altitude_amsl: 0_i16,
16388        altitude_sp: 0_i16,
16389        wp_distance: 0_u16,
16390        base_mode: MavModeFlag::DEFAULT,
16391        landed_state: MavLandedState::DEFAULT,
16392        throttle: 0_i8,
16393        airspeed: 0_u8,
16394        airspeed_sp: 0_u8,
16395        groundspeed: 0_u8,
16396        climb_rate: 0_i8,
16397        gps_nsat: 0_u8,
16398        gps_fix_type: GpsFixType::DEFAULT,
16399        battery_remaining: 0_u8,
16400        temperature: 0_i8,
16401        temperature_air: 0_i8,
16402        failsafe: 0_u8,
16403        wp_num: 0_u8,
16404    };
16405    #[cfg(feature = "arbitrary")]
16406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16407        use arbitrary::{Arbitrary, Unstructured};
16408        let mut buf = [0u8; 1024];
16409        rng.fill_bytes(&mut buf);
16410        let mut unstructured = Unstructured::new(&buf);
16411        Self::arbitrary(&mut unstructured).unwrap_or_default()
16412    }
16413}
16414impl Default for HIGH_LATENCY_DATA {
16415    fn default() -> Self {
16416        Self::DEFAULT.clone()
16417    }
16418}
16419impl MessageData for HIGH_LATENCY_DATA {
16420    type Message = MavMessage;
16421    const ID: u32 = 234u32;
16422    const NAME: &'static str = "HIGH_LATENCY";
16423    const EXTRA_CRC: u8 = 150u8;
16424    const ENCODED_LEN: usize = 40usize;
16425    fn deser(
16426        _version: MavlinkVersion,
16427        __input: &[u8],
16428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16429        let avail_len = __input.len();
16430        let mut payload_buf = [0; Self::ENCODED_LEN];
16431        let mut buf = if avail_len < Self::ENCODED_LEN {
16432            payload_buf[0..avail_len].copy_from_slice(__input);
16433            Bytes::new(&payload_buf)
16434        } else {
16435            Bytes::new(__input)
16436        };
16437        let mut __struct = Self::default();
16438        __struct.custom_mode = buf.get_u32_le();
16439        __struct.latitude = buf.get_i32_le();
16440        __struct.longitude = buf.get_i32_le();
16441        __struct.roll = buf.get_i16_le();
16442        __struct.pitch = buf.get_i16_le();
16443        __struct.heading = buf.get_u16_le();
16444        __struct.heading_sp = buf.get_i16_le();
16445        __struct.altitude_amsl = buf.get_i16_le();
16446        __struct.altitude_sp = buf.get_i16_le();
16447        __struct.wp_distance = buf.get_u16_le();
16448        let tmp = buf.get_u8();
16449        __struct.base_mode =
16450            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16451                flag_type: "MavModeFlag",
16452                value: tmp as u64,
16453            })?;
16454        let tmp = buf.get_u8();
16455        __struct.landed_state =
16456            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16457                enum_type: "MavLandedState",
16458                value: tmp as u64,
16459            })?;
16460        __struct.throttle = buf.get_i8();
16461        __struct.airspeed = buf.get_u8();
16462        __struct.airspeed_sp = buf.get_u8();
16463        __struct.groundspeed = buf.get_u8();
16464        __struct.climb_rate = buf.get_i8();
16465        __struct.gps_nsat = buf.get_u8();
16466        let tmp = buf.get_u8();
16467        __struct.gps_fix_type =
16468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16469                enum_type: "GpsFixType",
16470                value: tmp as u64,
16471            })?;
16472        __struct.battery_remaining = buf.get_u8();
16473        __struct.temperature = buf.get_i8();
16474        __struct.temperature_air = buf.get_i8();
16475        __struct.failsafe = buf.get_u8();
16476        __struct.wp_num = buf.get_u8();
16477        Ok(__struct)
16478    }
16479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16480        let mut __tmp = BytesMut::new(bytes);
16481        #[allow(clippy::absurd_extreme_comparisons)]
16482        #[allow(unused_comparisons)]
16483        if __tmp.remaining() < Self::ENCODED_LEN {
16484            panic!(
16485                "buffer is too small (need {} bytes, but got {})",
16486                Self::ENCODED_LEN,
16487                __tmp.remaining(),
16488            )
16489        }
16490        __tmp.put_u32_le(self.custom_mode);
16491        __tmp.put_i32_le(self.latitude);
16492        __tmp.put_i32_le(self.longitude);
16493        __tmp.put_i16_le(self.roll);
16494        __tmp.put_i16_le(self.pitch);
16495        __tmp.put_u16_le(self.heading);
16496        __tmp.put_i16_le(self.heading_sp);
16497        __tmp.put_i16_le(self.altitude_amsl);
16498        __tmp.put_i16_le(self.altitude_sp);
16499        __tmp.put_u16_le(self.wp_distance);
16500        __tmp.put_u8(self.base_mode.bits());
16501        __tmp.put_u8(self.landed_state as u8);
16502        __tmp.put_i8(self.throttle);
16503        __tmp.put_u8(self.airspeed);
16504        __tmp.put_u8(self.airspeed_sp);
16505        __tmp.put_u8(self.groundspeed);
16506        __tmp.put_i8(self.climb_rate);
16507        __tmp.put_u8(self.gps_nsat);
16508        __tmp.put_u8(self.gps_fix_type as u8);
16509        __tmp.put_u8(self.battery_remaining);
16510        __tmp.put_i8(self.temperature);
16511        __tmp.put_i8(self.temperature_air);
16512        __tmp.put_u8(self.failsafe);
16513        __tmp.put_u8(self.wp_num);
16514        if matches!(version, MavlinkVersion::V2) {
16515            let len = __tmp.len();
16516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16517        } else {
16518            __tmp.len()
16519        }
16520    }
16521}
16522#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16523#[doc = ""]
16524#[doc = "ID: 235"]
16525#[derive(Debug, Clone, PartialEq)]
16526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16528#[cfg_attr(feature = "ts", derive(TS))]
16529#[cfg_attr(feature = "ts", ts(export))]
16530pub struct HIGH_LATENCY2_DATA {
16531    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16532    pub timestamp: u32,
16533    #[doc = "Latitude"]
16534    pub latitude: i32,
16535    #[doc = "Longitude"]
16536    pub longitude: i32,
16537    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16538    pub custom_mode: u16,
16539    #[doc = "Altitude above mean sea level"]
16540    pub altitude: i16,
16541    #[doc = "Altitude setpoint"]
16542    pub target_altitude: i16,
16543    #[doc = "Distance to target waypoint or position"]
16544    pub target_distance: u16,
16545    #[doc = "Current waypoint number"]
16546    pub wp_num: u16,
16547    #[doc = "Bitmap of failure flags."]
16548    pub failure_flags: HlFailureFlag,
16549    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16550    pub mavtype: MavType,
16551    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16552    pub autopilot: MavAutopilot,
16553    #[doc = "Heading"]
16554    pub heading: u8,
16555    #[doc = "Heading setpoint"]
16556    pub target_heading: u8,
16557    #[doc = "Throttle"]
16558    pub throttle: u8,
16559    #[doc = "Airspeed"]
16560    pub airspeed: u8,
16561    #[doc = "Airspeed setpoint"]
16562    pub airspeed_sp: u8,
16563    #[doc = "Groundspeed"]
16564    pub groundspeed: u8,
16565    #[doc = "Windspeed"]
16566    pub windspeed: u8,
16567    #[doc = "Wind heading"]
16568    pub wind_heading: u8,
16569    #[doc = "Maximum error horizontal position since last message"]
16570    pub eph: u8,
16571    #[doc = "Maximum error vertical position since last message"]
16572    pub epv: u8,
16573    #[doc = "Air temperature"]
16574    pub temperature_air: i8,
16575    #[doc = "Maximum climb rate magnitude since last message"]
16576    pub climb_rate: i8,
16577    #[doc = "Battery level (-1 if field not provided)."]
16578    pub battery: i8,
16579    #[doc = "Field for custom payload."]
16580    pub custom0: i8,
16581    #[doc = "Field for custom payload."]
16582    pub custom1: i8,
16583    #[doc = "Field for custom payload."]
16584    pub custom2: i8,
16585}
16586impl HIGH_LATENCY2_DATA {
16587    pub const ENCODED_LEN: usize = 42usize;
16588    pub const DEFAULT: Self = Self {
16589        timestamp: 0_u32,
16590        latitude: 0_i32,
16591        longitude: 0_i32,
16592        custom_mode: 0_u16,
16593        altitude: 0_i16,
16594        target_altitude: 0_i16,
16595        target_distance: 0_u16,
16596        wp_num: 0_u16,
16597        failure_flags: HlFailureFlag::DEFAULT,
16598        mavtype: MavType::DEFAULT,
16599        autopilot: MavAutopilot::DEFAULT,
16600        heading: 0_u8,
16601        target_heading: 0_u8,
16602        throttle: 0_u8,
16603        airspeed: 0_u8,
16604        airspeed_sp: 0_u8,
16605        groundspeed: 0_u8,
16606        windspeed: 0_u8,
16607        wind_heading: 0_u8,
16608        eph: 0_u8,
16609        epv: 0_u8,
16610        temperature_air: 0_i8,
16611        climb_rate: 0_i8,
16612        battery: 0_i8,
16613        custom0: 0_i8,
16614        custom1: 0_i8,
16615        custom2: 0_i8,
16616    };
16617    #[cfg(feature = "arbitrary")]
16618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16619        use arbitrary::{Arbitrary, Unstructured};
16620        let mut buf = [0u8; 1024];
16621        rng.fill_bytes(&mut buf);
16622        let mut unstructured = Unstructured::new(&buf);
16623        Self::arbitrary(&mut unstructured).unwrap_or_default()
16624    }
16625}
16626impl Default for HIGH_LATENCY2_DATA {
16627    fn default() -> Self {
16628        Self::DEFAULT.clone()
16629    }
16630}
16631impl MessageData for HIGH_LATENCY2_DATA {
16632    type Message = MavMessage;
16633    const ID: u32 = 235u32;
16634    const NAME: &'static str = "HIGH_LATENCY2";
16635    const EXTRA_CRC: u8 = 179u8;
16636    const ENCODED_LEN: usize = 42usize;
16637    fn deser(
16638        _version: MavlinkVersion,
16639        __input: &[u8],
16640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16641        let avail_len = __input.len();
16642        let mut payload_buf = [0; Self::ENCODED_LEN];
16643        let mut buf = if avail_len < Self::ENCODED_LEN {
16644            payload_buf[0..avail_len].copy_from_slice(__input);
16645            Bytes::new(&payload_buf)
16646        } else {
16647            Bytes::new(__input)
16648        };
16649        let mut __struct = Self::default();
16650        __struct.timestamp = buf.get_u32_le();
16651        __struct.latitude = buf.get_i32_le();
16652        __struct.longitude = buf.get_i32_le();
16653        __struct.custom_mode = buf.get_u16_le();
16654        __struct.altitude = buf.get_i16_le();
16655        __struct.target_altitude = buf.get_i16_le();
16656        __struct.target_distance = buf.get_u16_le();
16657        __struct.wp_num = buf.get_u16_le();
16658        let tmp = buf.get_u16_le();
16659        __struct.failure_flags = HlFailureFlag::from_bits(tmp).ok_or(
16660            ::mavlink_core::error::ParserError::InvalidFlag {
16661                flag_type: "HlFailureFlag",
16662                value: tmp as u64,
16663            },
16664        )?;
16665        let tmp = buf.get_u8();
16666        __struct.mavtype =
16667            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16668                enum_type: "MavType",
16669                value: tmp as u64,
16670            })?;
16671        let tmp = buf.get_u8();
16672        __struct.autopilot =
16673            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16674                enum_type: "MavAutopilot",
16675                value: tmp as u64,
16676            })?;
16677        __struct.heading = buf.get_u8();
16678        __struct.target_heading = buf.get_u8();
16679        __struct.throttle = buf.get_u8();
16680        __struct.airspeed = buf.get_u8();
16681        __struct.airspeed_sp = buf.get_u8();
16682        __struct.groundspeed = buf.get_u8();
16683        __struct.windspeed = buf.get_u8();
16684        __struct.wind_heading = buf.get_u8();
16685        __struct.eph = buf.get_u8();
16686        __struct.epv = buf.get_u8();
16687        __struct.temperature_air = buf.get_i8();
16688        __struct.climb_rate = buf.get_i8();
16689        __struct.battery = buf.get_i8();
16690        __struct.custom0 = buf.get_i8();
16691        __struct.custom1 = buf.get_i8();
16692        __struct.custom2 = buf.get_i8();
16693        Ok(__struct)
16694    }
16695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16696        let mut __tmp = BytesMut::new(bytes);
16697        #[allow(clippy::absurd_extreme_comparisons)]
16698        #[allow(unused_comparisons)]
16699        if __tmp.remaining() < Self::ENCODED_LEN {
16700            panic!(
16701                "buffer is too small (need {} bytes, but got {})",
16702                Self::ENCODED_LEN,
16703                __tmp.remaining(),
16704            )
16705        }
16706        __tmp.put_u32_le(self.timestamp);
16707        __tmp.put_i32_le(self.latitude);
16708        __tmp.put_i32_le(self.longitude);
16709        __tmp.put_u16_le(self.custom_mode);
16710        __tmp.put_i16_le(self.altitude);
16711        __tmp.put_i16_le(self.target_altitude);
16712        __tmp.put_u16_le(self.target_distance);
16713        __tmp.put_u16_le(self.wp_num);
16714        __tmp.put_u16_le(self.failure_flags.bits());
16715        __tmp.put_u8(self.mavtype as u8);
16716        __tmp.put_u8(self.autopilot as u8);
16717        __tmp.put_u8(self.heading);
16718        __tmp.put_u8(self.target_heading);
16719        __tmp.put_u8(self.throttle);
16720        __tmp.put_u8(self.airspeed);
16721        __tmp.put_u8(self.airspeed_sp);
16722        __tmp.put_u8(self.groundspeed);
16723        __tmp.put_u8(self.windspeed);
16724        __tmp.put_u8(self.wind_heading);
16725        __tmp.put_u8(self.eph);
16726        __tmp.put_u8(self.epv);
16727        __tmp.put_i8(self.temperature_air);
16728        __tmp.put_i8(self.climb_rate);
16729        __tmp.put_i8(self.battery);
16730        __tmp.put_i8(self.custom0);
16731        __tmp.put_i8(self.custom1);
16732        __tmp.put_i8(self.custom2);
16733        if matches!(version, MavlinkVersion::V2) {
16734            let len = __tmp.len();
16735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16736        } else {
16737            __tmp.len()
16738        }
16739    }
16740}
16741#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16742#[doc = ""]
16743#[doc = "ID: 93"]
16744#[derive(Debug, Clone, PartialEq)]
16745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16747#[cfg_attr(feature = "ts", derive(TS))]
16748#[cfg_attr(feature = "ts", ts(export))]
16749pub struct HIL_ACTUATOR_CONTROLS_DATA {
16750    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16751    pub time_usec: u64,
16752    #[doc = "Flags bitmask."]
16753    pub flags: HilActuatorControlsFlags,
16754    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16757    pub controls: [f32; 16],
16758    #[doc = "System mode. Includes arming state."]
16759    pub mode: MavModeFlag,
16760}
16761impl HIL_ACTUATOR_CONTROLS_DATA {
16762    pub const ENCODED_LEN: usize = 81usize;
16763    pub const DEFAULT: Self = Self {
16764        time_usec: 0_u64,
16765        flags: HilActuatorControlsFlags::DEFAULT,
16766        controls: [0.0_f32; 16usize],
16767        mode: MavModeFlag::DEFAULT,
16768    };
16769    #[cfg(feature = "arbitrary")]
16770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16771        use arbitrary::{Arbitrary, Unstructured};
16772        let mut buf = [0u8; 1024];
16773        rng.fill_bytes(&mut buf);
16774        let mut unstructured = Unstructured::new(&buf);
16775        Self::arbitrary(&mut unstructured).unwrap_or_default()
16776    }
16777}
16778impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16779    fn default() -> Self {
16780        Self::DEFAULT.clone()
16781    }
16782}
16783impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16784    type Message = MavMessage;
16785    const ID: u32 = 93u32;
16786    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16787    const EXTRA_CRC: u8 = 47u8;
16788    const ENCODED_LEN: usize = 81usize;
16789    fn deser(
16790        _version: MavlinkVersion,
16791        __input: &[u8],
16792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16793        let avail_len = __input.len();
16794        let mut payload_buf = [0; Self::ENCODED_LEN];
16795        let mut buf = if avail_len < Self::ENCODED_LEN {
16796            payload_buf[0..avail_len].copy_from_slice(__input);
16797            Bytes::new(&payload_buf)
16798        } else {
16799            Bytes::new(__input)
16800        };
16801        let mut __struct = Self::default();
16802        __struct.time_usec = buf.get_u64_le();
16803        let tmp = buf.get_u64_le();
16804        __struct.flags = HilActuatorControlsFlags::from_bits(tmp).ok_or(
16805            ::mavlink_core::error::ParserError::InvalidFlag {
16806                flag_type: "HilActuatorControlsFlags",
16807                value: tmp as u64,
16808            },
16809        )?;
16810        for v in &mut __struct.controls {
16811            let val = buf.get_f32_le();
16812            *v = val;
16813        }
16814        let tmp = buf.get_u8();
16815        __struct.mode =
16816            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16817                flag_type: "MavModeFlag",
16818                value: tmp as u64,
16819            })?;
16820        Ok(__struct)
16821    }
16822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16823        let mut __tmp = BytesMut::new(bytes);
16824        #[allow(clippy::absurd_extreme_comparisons)]
16825        #[allow(unused_comparisons)]
16826        if __tmp.remaining() < Self::ENCODED_LEN {
16827            panic!(
16828                "buffer is too small (need {} bytes, but got {})",
16829                Self::ENCODED_LEN,
16830                __tmp.remaining(),
16831            )
16832        }
16833        __tmp.put_u64_le(self.time_usec);
16834        __tmp.put_u64_le(self.flags.bits());
16835        for val in &self.controls {
16836            __tmp.put_f32_le(*val);
16837        }
16838        __tmp.put_u8(self.mode.bits());
16839        if matches!(version, MavlinkVersion::V2) {
16840            let len = __tmp.len();
16841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16842        } else {
16843            __tmp.len()
16844        }
16845    }
16846}
16847#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16848#[doc = ""]
16849#[doc = "ID: 91"]
16850#[derive(Debug, Clone, PartialEq)]
16851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16853#[cfg_attr(feature = "ts", derive(TS))]
16854#[cfg_attr(feature = "ts", ts(export))]
16855pub struct HIL_CONTROLS_DATA {
16856    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16857    pub time_usec: u64,
16858    #[doc = "Control output -1 .. 1"]
16859    pub roll_ailerons: f32,
16860    #[doc = "Control output -1 .. 1"]
16861    pub pitch_elevator: f32,
16862    #[doc = "Control output -1 .. 1"]
16863    pub yaw_rudder: f32,
16864    #[doc = "Throttle 0 .. 1"]
16865    pub throttle: f32,
16866    #[doc = "Aux 1, -1 .. 1"]
16867    pub aux1: f32,
16868    #[doc = "Aux 2, -1 .. 1"]
16869    pub aux2: f32,
16870    #[doc = "Aux 3, -1 .. 1"]
16871    pub aux3: f32,
16872    #[doc = "Aux 4, -1 .. 1"]
16873    pub aux4: f32,
16874    #[doc = "System mode."]
16875    pub mode: MavMode,
16876    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16877    pub nav_mode: u8,
16878}
16879impl HIL_CONTROLS_DATA {
16880    pub const ENCODED_LEN: usize = 42usize;
16881    pub const DEFAULT: Self = Self {
16882        time_usec: 0_u64,
16883        roll_ailerons: 0.0_f32,
16884        pitch_elevator: 0.0_f32,
16885        yaw_rudder: 0.0_f32,
16886        throttle: 0.0_f32,
16887        aux1: 0.0_f32,
16888        aux2: 0.0_f32,
16889        aux3: 0.0_f32,
16890        aux4: 0.0_f32,
16891        mode: MavMode::DEFAULT,
16892        nav_mode: 0_u8,
16893    };
16894    #[cfg(feature = "arbitrary")]
16895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16896        use arbitrary::{Arbitrary, Unstructured};
16897        let mut buf = [0u8; 1024];
16898        rng.fill_bytes(&mut buf);
16899        let mut unstructured = Unstructured::new(&buf);
16900        Self::arbitrary(&mut unstructured).unwrap_or_default()
16901    }
16902}
16903impl Default for HIL_CONTROLS_DATA {
16904    fn default() -> Self {
16905        Self::DEFAULT.clone()
16906    }
16907}
16908impl MessageData for HIL_CONTROLS_DATA {
16909    type Message = MavMessage;
16910    const ID: u32 = 91u32;
16911    const NAME: &'static str = "HIL_CONTROLS";
16912    const EXTRA_CRC: u8 = 63u8;
16913    const ENCODED_LEN: usize = 42usize;
16914    fn deser(
16915        _version: MavlinkVersion,
16916        __input: &[u8],
16917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16918        let avail_len = __input.len();
16919        let mut payload_buf = [0; Self::ENCODED_LEN];
16920        let mut buf = if avail_len < Self::ENCODED_LEN {
16921            payload_buf[0..avail_len].copy_from_slice(__input);
16922            Bytes::new(&payload_buf)
16923        } else {
16924            Bytes::new(__input)
16925        };
16926        let mut __struct = Self::default();
16927        __struct.time_usec = buf.get_u64_le();
16928        __struct.roll_ailerons = buf.get_f32_le();
16929        __struct.pitch_elevator = buf.get_f32_le();
16930        __struct.yaw_rudder = buf.get_f32_le();
16931        __struct.throttle = buf.get_f32_le();
16932        __struct.aux1 = buf.get_f32_le();
16933        __struct.aux2 = buf.get_f32_le();
16934        __struct.aux3 = buf.get_f32_le();
16935        __struct.aux4 = buf.get_f32_le();
16936        let tmp = buf.get_u8();
16937        __struct.mode =
16938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16939                enum_type: "MavMode",
16940                value: tmp as u64,
16941            })?;
16942        __struct.nav_mode = buf.get_u8();
16943        Ok(__struct)
16944    }
16945    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16946        let mut __tmp = BytesMut::new(bytes);
16947        #[allow(clippy::absurd_extreme_comparisons)]
16948        #[allow(unused_comparisons)]
16949        if __tmp.remaining() < Self::ENCODED_LEN {
16950            panic!(
16951                "buffer is too small (need {} bytes, but got {})",
16952                Self::ENCODED_LEN,
16953                __tmp.remaining(),
16954            )
16955        }
16956        __tmp.put_u64_le(self.time_usec);
16957        __tmp.put_f32_le(self.roll_ailerons);
16958        __tmp.put_f32_le(self.pitch_elevator);
16959        __tmp.put_f32_le(self.yaw_rudder);
16960        __tmp.put_f32_le(self.throttle);
16961        __tmp.put_f32_le(self.aux1);
16962        __tmp.put_f32_le(self.aux2);
16963        __tmp.put_f32_le(self.aux3);
16964        __tmp.put_f32_le(self.aux4);
16965        __tmp.put_u8(self.mode as u8);
16966        __tmp.put_u8(self.nav_mode);
16967        if matches!(version, MavlinkVersion::V2) {
16968            let len = __tmp.len();
16969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16970        } else {
16971            __tmp.len()
16972        }
16973    }
16974}
16975#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16976#[doc = ""]
16977#[doc = "ID: 113"]
16978#[derive(Debug, Clone, PartialEq)]
16979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16981#[cfg_attr(feature = "ts", derive(TS))]
16982#[cfg_attr(feature = "ts", ts(export))]
16983pub struct HIL_GPS_DATA {
16984    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16985    pub time_usec: u64,
16986    #[doc = "Latitude (WGS84)"]
16987    pub lat: i32,
16988    #[doc = "Longitude (WGS84)"]
16989    pub lon: i32,
16990    #[doc = "Altitude (MSL). Positive for up."]
16991    pub alt: i32,
16992    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16993    pub eph: u16,
16994    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16995    pub epv: u16,
16996    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16997    pub vel: u16,
16998    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16999    pub vn: i16,
17000    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
17001    pub ve: i16,
17002    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
17003    pub vd: i16,
17004    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
17005    pub cog: u16,
17006    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
17007    pub fix_type: u8,
17008    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17009    pub satellites_visible: u8,
17010    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
17011    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17012    pub id: u8,
17013    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
17014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17015    pub yaw: u16,
17016}
17017impl HIL_GPS_DATA {
17018    pub const ENCODED_LEN: usize = 39usize;
17019    pub const DEFAULT: Self = Self {
17020        time_usec: 0_u64,
17021        lat: 0_i32,
17022        lon: 0_i32,
17023        alt: 0_i32,
17024        eph: 0_u16,
17025        epv: 0_u16,
17026        vel: 0_u16,
17027        vn: 0_i16,
17028        ve: 0_i16,
17029        vd: 0_i16,
17030        cog: 0_u16,
17031        fix_type: 0_u8,
17032        satellites_visible: 0_u8,
17033        id: 0_u8,
17034        yaw: 0_u16,
17035    };
17036    #[cfg(feature = "arbitrary")]
17037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17038        use arbitrary::{Arbitrary, Unstructured};
17039        let mut buf = [0u8; 1024];
17040        rng.fill_bytes(&mut buf);
17041        let mut unstructured = Unstructured::new(&buf);
17042        Self::arbitrary(&mut unstructured).unwrap_or_default()
17043    }
17044}
17045impl Default for HIL_GPS_DATA {
17046    fn default() -> Self {
17047        Self::DEFAULT.clone()
17048    }
17049}
17050impl MessageData for HIL_GPS_DATA {
17051    type Message = MavMessage;
17052    const ID: u32 = 113u32;
17053    const NAME: &'static str = "HIL_GPS";
17054    const EXTRA_CRC: u8 = 124u8;
17055    const ENCODED_LEN: usize = 39usize;
17056    fn deser(
17057        _version: MavlinkVersion,
17058        __input: &[u8],
17059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17060        let avail_len = __input.len();
17061        let mut payload_buf = [0; Self::ENCODED_LEN];
17062        let mut buf = if avail_len < Self::ENCODED_LEN {
17063            payload_buf[0..avail_len].copy_from_slice(__input);
17064            Bytes::new(&payload_buf)
17065        } else {
17066            Bytes::new(__input)
17067        };
17068        let mut __struct = Self::default();
17069        __struct.time_usec = buf.get_u64_le();
17070        __struct.lat = buf.get_i32_le();
17071        __struct.lon = buf.get_i32_le();
17072        __struct.alt = buf.get_i32_le();
17073        __struct.eph = buf.get_u16_le();
17074        __struct.epv = buf.get_u16_le();
17075        __struct.vel = buf.get_u16_le();
17076        __struct.vn = buf.get_i16_le();
17077        __struct.ve = buf.get_i16_le();
17078        __struct.vd = buf.get_i16_le();
17079        __struct.cog = buf.get_u16_le();
17080        __struct.fix_type = buf.get_u8();
17081        __struct.satellites_visible = buf.get_u8();
17082        __struct.id = buf.get_u8();
17083        __struct.yaw = buf.get_u16_le();
17084        Ok(__struct)
17085    }
17086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17087        let mut __tmp = BytesMut::new(bytes);
17088        #[allow(clippy::absurd_extreme_comparisons)]
17089        #[allow(unused_comparisons)]
17090        if __tmp.remaining() < Self::ENCODED_LEN {
17091            panic!(
17092                "buffer is too small (need {} bytes, but got {})",
17093                Self::ENCODED_LEN,
17094                __tmp.remaining(),
17095            )
17096        }
17097        __tmp.put_u64_le(self.time_usec);
17098        __tmp.put_i32_le(self.lat);
17099        __tmp.put_i32_le(self.lon);
17100        __tmp.put_i32_le(self.alt);
17101        __tmp.put_u16_le(self.eph);
17102        __tmp.put_u16_le(self.epv);
17103        __tmp.put_u16_le(self.vel);
17104        __tmp.put_i16_le(self.vn);
17105        __tmp.put_i16_le(self.ve);
17106        __tmp.put_i16_le(self.vd);
17107        __tmp.put_u16_le(self.cog);
17108        __tmp.put_u8(self.fix_type);
17109        __tmp.put_u8(self.satellites_visible);
17110        if matches!(version, MavlinkVersion::V2) {
17111            __tmp.put_u8(self.id);
17112            __tmp.put_u16_le(self.yaw);
17113            let len = __tmp.len();
17114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17115        } else {
17116            __tmp.len()
17117        }
17118    }
17119}
17120#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
17121#[doc = ""]
17122#[doc = "ID: 114"]
17123#[derive(Debug, Clone, PartialEq)]
17124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17126#[cfg_attr(feature = "ts", derive(TS))]
17127#[cfg_attr(feature = "ts", ts(export))]
17128pub struct HIL_OPTICAL_FLOW_DATA {
17129    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17130    pub time_usec: u64,
17131    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
17132    pub integration_time_us: u32,
17133    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
17134    pub integrated_x: f32,
17135    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
17136    pub integrated_y: f32,
17137    #[doc = "RH rotation around X axis"]
17138    pub integrated_xgyro: f32,
17139    #[doc = "RH rotation around Y axis"]
17140    pub integrated_ygyro: f32,
17141    #[doc = "RH rotation around Z axis"]
17142    pub integrated_zgyro: f32,
17143    #[doc = "Time since the distance was sampled."]
17144    pub time_delta_distance_us: u32,
17145    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
17146    pub distance: f32,
17147    #[doc = "Temperature"]
17148    pub temperature: i16,
17149    #[doc = "Sensor ID"]
17150    pub sensor_id: u8,
17151    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
17152    pub quality: u8,
17153}
17154impl HIL_OPTICAL_FLOW_DATA {
17155    pub const ENCODED_LEN: usize = 44usize;
17156    pub const DEFAULT: Self = Self {
17157        time_usec: 0_u64,
17158        integration_time_us: 0_u32,
17159        integrated_x: 0.0_f32,
17160        integrated_y: 0.0_f32,
17161        integrated_xgyro: 0.0_f32,
17162        integrated_ygyro: 0.0_f32,
17163        integrated_zgyro: 0.0_f32,
17164        time_delta_distance_us: 0_u32,
17165        distance: 0.0_f32,
17166        temperature: 0_i16,
17167        sensor_id: 0_u8,
17168        quality: 0_u8,
17169    };
17170    #[cfg(feature = "arbitrary")]
17171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17172        use arbitrary::{Arbitrary, Unstructured};
17173        let mut buf = [0u8; 1024];
17174        rng.fill_bytes(&mut buf);
17175        let mut unstructured = Unstructured::new(&buf);
17176        Self::arbitrary(&mut unstructured).unwrap_or_default()
17177    }
17178}
17179impl Default for HIL_OPTICAL_FLOW_DATA {
17180    fn default() -> Self {
17181        Self::DEFAULT.clone()
17182    }
17183}
17184impl MessageData for HIL_OPTICAL_FLOW_DATA {
17185    type Message = MavMessage;
17186    const ID: u32 = 114u32;
17187    const NAME: &'static str = "HIL_OPTICAL_FLOW";
17188    const EXTRA_CRC: u8 = 237u8;
17189    const ENCODED_LEN: usize = 44usize;
17190    fn deser(
17191        _version: MavlinkVersion,
17192        __input: &[u8],
17193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17194        let avail_len = __input.len();
17195        let mut payload_buf = [0; Self::ENCODED_LEN];
17196        let mut buf = if avail_len < Self::ENCODED_LEN {
17197            payload_buf[0..avail_len].copy_from_slice(__input);
17198            Bytes::new(&payload_buf)
17199        } else {
17200            Bytes::new(__input)
17201        };
17202        let mut __struct = Self::default();
17203        __struct.time_usec = buf.get_u64_le();
17204        __struct.integration_time_us = buf.get_u32_le();
17205        __struct.integrated_x = buf.get_f32_le();
17206        __struct.integrated_y = buf.get_f32_le();
17207        __struct.integrated_xgyro = buf.get_f32_le();
17208        __struct.integrated_ygyro = buf.get_f32_le();
17209        __struct.integrated_zgyro = buf.get_f32_le();
17210        __struct.time_delta_distance_us = buf.get_u32_le();
17211        __struct.distance = buf.get_f32_le();
17212        __struct.temperature = buf.get_i16_le();
17213        __struct.sensor_id = buf.get_u8();
17214        __struct.quality = buf.get_u8();
17215        Ok(__struct)
17216    }
17217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17218        let mut __tmp = BytesMut::new(bytes);
17219        #[allow(clippy::absurd_extreme_comparisons)]
17220        #[allow(unused_comparisons)]
17221        if __tmp.remaining() < Self::ENCODED_LEN {
17222            panic!(
17223                "buffer is too small (need {} bytes, but got {})",
17224                Self::ENCODED_LEN,
17225                __tmp.remaining(),
17226            )
17227        }
17228        __tmp.put_u64_le(self.time_usec);
17229        __tmp.put_u32_le(self.integration_time_us);
17230        __tmp.put_f32_le(self.integrated_x);
17231        __tmp.put_f32_le(self.integrated_y);
17232        __tmp.put_f32_le(self.integrated_xgyro);
17233        __tmp.put_f32_le(self.integrated_ygyro);
17234        __tmp.put_f32_le(self.integrated_zgyro);
17235        __tmp.put_u32_le(self.time_delta_distance_us);
17236        __tmp.put_f32_le(self.distance);
17237        __tmp.put_i16_le(self.temperature);
17238        __tmp.put_u8(self.sensor_id);
17239        __tmp.put_u8(self.quality);
17240        if matches!(version, MavlinkVersion::V2) {
17241            let len = __tmp.len();
17242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17243        } else {
17244            __tmp.len()
17245        }
17246    }
17247}
17248#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
17249#[doc = ""]
17250#[doc = "ID: 92"]
17251#[derive(Debug, Clone, PartialEq)]
17252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17254#[cfg_attr(feature = "ts", derive(TS))]
17255#[cfg_attr(feature = "ts", ts(export))]
17256pub struct HIL_RC_INPUTS_RAW_DATA {
17257    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17258    pub time_usec: u64,
17259    #[doc = "RC channel 1 value"]
17260    pub chan1_raw: u16,
17261    #[doc = "RC channel 2 value"]
17262    pub chan2_raw: u16,
17263    #[doc = "RC channel 3 value"]
17264    pub chan3_raw: u16,
17265    #[doc = "RC channel 4 value"]
17266    pub chan4_raw: u16,
17267    #[doc = "RC channel 5 value"]
17268    pub chan5_raw: u16,
17269    #[doc = "RC channel 6 value"]
17270    pub chan6_raw: u16,
17271    #[doc = "RC channel 7 value"]
17272    pub chan7_raw: u16,
17273    #[doc = "RC channel 8 value"]
17274    pub chan8_raw: u16,
17275    #[doc = "RC channel 9 value"]
17276    pub chan9_raw: u16,
17277    #[doc = "RC channel 10 value"]
17278    pub chan10_raw: u16,
17279    #[doc = "RC channel 11 value"]
17280    pub chan11_raw: u16,
17281    #[doc = "RC channel 12 value"]
17282    pub chan12_raw: u16,
17283    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17284    pub rssi: u8,
17285}
17286impl HIL_RC_INPUTS_RAW_DATA {
17287    pub const ENCODED_LEN: usize = 33usize;
17288    pub const DEFAULT: Self = Self {
17289        time_usec: 0_u64,
17290        chan1_raw: 0_u16,
17291        chan2_raw: 0_u16,
17292        chan3_raw: 0_u16,
17293        chan4_raw: 0_u16,
17294        chan5_raw: 0_u16,
17295        chan6_raw: 0_u16,
17296        chan7_raw: 0_u16,
17297        chan8_raw: 0_u16,
17298        chan9_raw: 0_u16,
17299        chan10_raw: 0_u16,
17300        chan11_raw: 0_u16,
17301        chan12_raw: 0_u16,
17302        rssi: 0_u8,
17303    };
17304    #[cfg(feature = "arbitrary")]
17305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17306        use arbitrary::{Arbitrary, Unstructured};
17307        let mut buf = [0u8; 1024];
17308        rng.fill_bytes(&mut buf);
17309        let mut unstructured = Unstructured::new(&buf);
17310        Self::arbitrary(&mut unstructured).unwrap_or_default()
17311    }
17312}
17313impl Default for HIL_RC_INPUTS_RAW_DATA {
17314    fn default() -> Self {
17315        Self::DEFAULT.clone()
17316    }
17317}
17318impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17319    type Message = MavMessage;
17320    const ID: u32 = 92u32;
17321    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17322    const EXTRA_CRC: u8 = 54u8;
17323    const ENCODED_LEN: usize = 33usize;
17324    fn deser(
17325        _version: MavlinkVersion,
17326        __input: &[u8],
17327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17328        let avail_len = __input.len();
17329        let mut payload_buf = [0; Self::ENCODED_LEN];
17330        let mut buf = if avail_len < Self::ENCODED_LEN {
17331            payload_buf[0..avail_len].copy_from_slice(__input);
17332            Bytes::new(&payload_buf)
17333        } else {
17334            Bytes::new(__input)
17335        };
17336        let mut __struct = Self::default();
17337        __struct.time_usec = buf.get_u64_le();
17338        __struct.chan1_raw = buf.get_u16_le();
17339        __struct.chan2_raw = buf.get_u16_le();
17340        __struct.chan3_raw = buf.get_u16_le();
17341        __struct.chan4_raw = buf.get_u16_le();
17342        __struct.chan5_raw = buf.get_u16_le();
17343        __struct.chan6_raw = buf.get_u16_le();
17344        __struct.chan7_raw = buf.get_u16_le();
17345        __struct.chan8_raw = buf.get_u16_le();
17346        __struct.chan9_raw = buf.get_u16_le();
17347        __struct.chan10_raw = buf.get_u16_le();
17348        __struct.chan11_raw = buf.get_u16_le();
17349        __struct.chan12_raw = buf.get_u16_le();
17350        __struct.rssi = buf.get_u8();
17351        Ok(__struct)
17352    }
17353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17354        let mut __tmp = BytesMut::new(bytes);
17355        #[allow(clippy::absurd_extreme_comparisons)]
17356        #[allow(unused_comparisons)]
17357        if __tmp.remaining() < Self::ENCODED_LEN {
17358            panic!(
17359                "buffer is too small (need {} bytes, but got {})",
17360                Self::ENCODED_LEN,
17361                __tmp.remaining(),
17362            )
17363        }
17364        __tmp.put_u64_le(self.time_usec);
17365        __tmp.put_u16_le(self.chan1_raw);
17366        __tmp.put_u16_le(self.chan2_raw);
17367        __tmp.put_u16_le(self.chan3_raw);
17368        __tmp.put_u16_le(self.chan4_raw);
17369        __tmp.put_u16_le(self.chan5_raw);
17370        __tmp.put_u16_le(self.chan6_raw);
17371        __tmp.put_u16_le(self.chan7_raw);
17372        __tmp.put_u16_le(self.chan8_raw);
17373        __tmp.put_u16_le(self.chan9_raw);
17374        __tmp.put_u16_le(self.chan10_raw);
17375        __tmp.put_u16_le(self.chan11_raw);
17376        __tmp.put_u16_le(self.chan12_raw);
17377        __tmp.put_u8(self.rssi);
17378        if matches!(version, MavlinkVersion::V2) {
17379            let len = __tmp.len();
17380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17381        } else {
17382            __tmp.len()
17383        }
17384    }
17385}
17386#[doc = "The IMU readings in SI units in NED body frame."]
17387#[doc = ""]
17388#[doc = "ID: 107"]
17389#[derive(Debug, Clone, PartialEq)]
17390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17392#[cfg_attr(feature = "ts", derive(TS))]
17393#[cfg_attr(feature = "ts", ts(export))]
17394pub struct HIL_SENSOR_DATA {
17395    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17396    pub time_usec: u64,
17397    #[doc = "X acceleration"]
17398    pub xacc: f32,
17399    #[doc = "Y acceleration"]
17400    pub yacc: f32,
17401    #[doc = "Z acceleration"]
17402    pub zacc: f32,
17403    #[doc = "Angular speed around X axis in body frame"]
17404    pub xgyro: f32,
17405    #[doc = "Angular speed around Y axis in body frame"]
17406    pub ygyro: f32,
17407    #[doc = "Angular speed around Z axis in body frame"]
17408    pub zgyro: f32,
17409    #[doc = "X Magnetic field"]
17410    pub xmag: f32,
17411    #[doc = "Y Magnetic field"]
17412    pub ymag: f32,
17413    #[doc = "Z Magnetic field"]
17414    pub zmag: f32,
17415    #[doc = "Absolute pressure"]
17416    pub abs_pressure: f32,
17417    #[doc = "Differential pressure (airspeed)"]
17418    pub diff_pressure: f32,
17419    #[doc = "Altitude calculated from pressure"]
17420    pub pressure_alt: f32,
17421    #[doc = "Temperature"]
17422    pub temperature: f32,
17423    #[doc = "Bitmap for fields that have updated since last message"]
17424    pub fields_updated: HilSensorUpdatedFlags,
17425    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17427    pub id: u8,
17428}
17429impl HIL_SENSOR_DATA {
17430    pub const ENCODED_LEN: usize = 65usize;
17431    pub const DEFAULT: Self = Self {
17432        time_usec: 0_u64,
17433        xacc: 0.0_f32,
17434        yacc: 0.0_f32,
17435        zacc: 0.0_f32,
17436        xgyro: 0.0_f32,
17437        ygyro: 0.0_f32,
17438        zgyro: 0.0_f32,
17439        xmag: 0.0_f32,
17440        ymag: 0.0_f32,
17441        zmag: 0.0_f32,
17442        abs_pressure: 0.0_f32,
17443        diff_pressure: 0.0_f32,
17444        pressure_alt: 0.0_f32,
17445        temperature: 0.0_f32,
17446        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17447        id: 0_u8,
17448    };
17449    #[cfg(feature = "arbitrary")]
17450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17451        use arbitrary::{Arbitrary, Unstructured};
17452        let mut buf = [0u8; 1024];
17453        rng.fill_bytes(&mut buf);
17454        let mut unstructured = Unstructured::new(&buf);
17455        Self::arbitrary(&mut unstructured).unwrap_or_default()
17456    }
17457}
17458impl Default for HIL_SENSOR_DATA {
17459    fn default() -> Self {
17460        Self::DEFAULT.clone()
17461    }
17462}
17463impl MessageData for HIL_SENSOR_DATA {
17464    type Message = MavMessage;
17465    const ID: u32 = 107u32;
17466    const NAME: &'static str = "HIL_SENSOR";
17467    const EXTRA_CRC: u8 = 108u8;
17468    const ENCODED_LEN: usize = 65usize;
17469    fn deser(
17470        _version: MavlinkVersion,
17471        __input: &[u8],
17472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17473        let avail_len = __input.len();
17474        let mut payload_buf = [0; Self::ENCODED_LEN];
17475        let mut buf = if avail_len < Self::ENCODED_LEN {
17476            payload_buf[0..avail_len].copy_from_slice(__input);
17477            Bytes::new(&payload_buf)
17478        } else {
17479            Bytes::new(__input)
17480        };
17481        let mut __struct = Self::default();
17482        __struct.time_usec = buf.get_u64_le();
17483        __struct.xacc = buf.get_f32_le();
17484        __struct.yacc = buf.get_f32_le();
17485        __struct.zacc = buf.get_f32_le();
17486        __struct.xgyro = buf.get_f32_le();
17487        __struct.ygyro = buf.get_f32_le();
17488        __struct.zgyro = buf.get_f32_le();
17489        __struct.xmag = buf.get_f32_le();
17490        __struct.ymag = buf.get_f32_le();
17491        __struct.zmag = buf.get_f32_le();
17492        __struct.abs_pressure = buf.get_f32_le();
17493        __struct.diff_pressure = buf.get_f32_le();
17494        __struct.pressure_alt = buf.get_f32_le();
17495        __struct.temperature = buf.get_f32_le();
17496        let tmp = buf.get_u32_le();
17497        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(tmp).ok_or(
17498            ::mavlink_core::error::ParserError::InvalidFlag {
17499                flag_type: "HilSensorUpdatedFlags",
17500                value: tmp as u64,
17501            },
17502        )?;
17503        __struct.id = buf.get_u8();
17504        Ok(__struct)
17505    }
17506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17507        let mut __tmp = BytesMut::new(bytes);
17508        #[allow(clippy::absurd_extreme_comparisons)]
17509        #[allow(unused_comparisons)]
17510        if __tmp.remaining() < Self::ENCODED_LEN {
17511            panic!(
17512                "buffer is too small (need {} bytes, but got {})",
17513                Self::ENCODED_LEN,
17514                __tmp.remaining(),
17515            )
17516        }
17517        __tmp.put_u64_le(self.time_usec);
17518        __tmp.put_f32_le(self.xacc);
17519        __tmp.put_f32_le(self.yacc);
17520        __tmp.put_f32_le(self.zacc);
17521        __tmp.put_f32_le(self.xgyro);
17522        __tmp.put_f32_le(self.ygyro);
17523        __tmp.put_f32_le(self.zgyro);
17524        __tmp.put_f32_le(self.xmag);
17525        __tmp.put_f32_le(self.ymag);
17526        __tmp.put_f32_le(self.zmag);
17527        __tmp.put_f32_le(self.abs_pressure);
17528        __tmp.put_f32_le(self.diff_pressure);
17529        __tmp.put_f32_le(self.pressure_alt);
17530        __tmp.put_f32_le(self.temperature);
17531        __tmp.put_u32_le(self.fields_updated.bits());
17532        if matches!(version, MavlinkVersion::V2) {
17533            __tmp.put_u8(self.id);
17534            let len = __tmp.len();
17535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17536        } else {
17537            __tmp.len()
17538        }
17539    }
17540}
17541#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17542#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17543#[doc = ""]
17544#[doc = "ID: 90"]
17545#[derive(Debug, Clone, PartialEq)]
17546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17548#[cfg_attr(feature = "ts", derive(TS))]
17549#[cfg_attr(feature = "ts", ts(export))]
17550pub struct HIL_STATE_DATA {
17551    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17552    pub time_usec: u64,
17553    #[doc = "Roll angle"]
17554    pub roll: f32,
17555    #[doc = "Pitch angle"]
17556    pub pitch: f32,
17557    #[doc = "Yaw angle"]
17558    pub yaw: f32,
17559    #[doc = "Body frame roll / phi angular speed"]
17560    pub rollspeed: f32,
17561    #[doc = "Body frame pitch / theta angular speed"]
17562    pub pitchspeed: f32,
17563    #[doc = "Body frame yaw / psi angular speed"]
17564    pub yawspeed: f32,
17565    #[doc = "Latitude"]
17566    pub lat: i32,
17567    #[doc = "Longitude"]
17568    pub lon: i32,
17569    #[doc = "Altitude"]
17570    pub alt: i32,
17571    #[doc = "Ground X Speed (Latitude)"]
17572    pub vx: i16,
17573    #[doc = "Ground Y Speed (Longitude)"]
17574    pub vy: i16,
17575    #[doc = "Ground Z Speed (Altitude)"]
17576    pub vz: i16,
17577    #[doc = "X acceleration"]
17578    pub xacc: i16,
17579    #[doc = "Y acceleration"]
17580    pub yacc: i16,
17581    #[doc = "Z acceleration"]
17582    pub zacc: i16,
17583}
17584impl HIL_STATE_DATA {
17585    pub const ENCODED_LEN: usize = 56usize;
17586    pub const DEFAULT: Self = Self {
17587        time_usec: 0_u64,
17588        roll: 0.0_f32,
17589        pitch: 0.0_f32,
17590        yaw: 0.0_f32,
17591        rollspeed: 0.0_f32,
17592        pitchspeed: 0.0_f32,
17593        yawspeed: 0.0_f32,
17594        lat: 0_i32,
17595        lon: 0_i32,
17596        alt: 0_i32,
17597        vx: 0_i16,
17598        vy: 0_i16,
17599        vz: 0_i16,
17600        xacc: 0_i16,
17601        yacc: 0_i16,
17602        zacc: 0_i16,
17603    };
17604    #[cfg(feature = "arbitrary")]
17605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17606        use arbitrary::{Arbitrary, Unstructured};
17607        let mut buf = [0u8; 1024];
17608        rng.fill_bytes(&mut buf);
17609        let mut unstructured = Unstructured::new(&buf);
17610        Self::arbitrary(&mut unstructured).unwrap_or_default()
17611    }
17612}
17613impl Default for HIL_STATE_DATA {
17614    fn default() -> Self {
17615        Self::DEFAULT.clone()
17616    }
17617}
17618impl MessageData for HIL_STATE_DATA {
17619    type Message = MavMessage;
17620    const ID: u32 = 90u32;
17621    const NAME: &'static str = "HIL_STATE";
17622    const EXTRA_CRC: u8 = 183u8;
17623    const ENCODED_LEN: usize = 56usize;
17624    fn deser(
17625        _version: MavlinkVersion,
17626        __input: &[u8],
17627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17628        let avail_len = __input.len();
17629        let mut payload_buf = [0; Self::ENCODED_LEN];
17630        let mut buf = if avail_len < Self::ENCODED_LEN {
17631            payload_buf[0..avail_len].copy_from_slice(__input);
17632            Bytes::new(&payload_buf)
17633        } else {
17634            Bytes::new(__input)
17635        };
17636        let mut __struct = Self::default();
17637        __struct.time_usec = buf.get_u64_le();
17638        __struct.roll = buf.get_f32_le();
17639        __struct.pitch = buf.get_f32_le();
17640        __struct.yaw = buf.get_f32_le();
17641        __struct.rollspeed = buf.get_f32_le();
17642        __struct.pitchspeed = buf.get_f32_le();
17643        __struct.yawspeed = buf.get_f32_le();
17644        __struct.lat = buf.get_i32_le();
17645        __struct.lon = buf.get_i32_le();
17646        __struct.alt = buf.get_i32_le();
17647        __struct.vx = buf.get_i16_le();
17648        __struct.vy = buf.get_i16_le();
17649        __struct.vz = buf.get_i16_le();
17650        __struct.xacc = buf.get_i16_le();
17651        __struct.yacc = buf.get_i16_le();
17652        __struct.zacc = buf.get_i16_le();
17653        Ok(__struct)
17654    }
17655    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17656        let mut __tmp = BytesMut::new(bytes);
17657        #[allow(clippy::absurd_extreme_comparisons)]
17658        #[allow(unused_comparisons)]
17659        if __tmp.remaining() < Self::ENCODED_LEN {
17660            panic!(
17661                "buffer is too small (need {} bytes, but got {})",
17662                Self::ENCODED_LEN,
17663                __tmp.remaining(),
17664            )
17665        }
17666        __tmp.put_u64_le(self.time_usec);
17667        __tmp.put_f32_le(self.roll);
17668        __tmp.put_f32_le(self.pitch);
17669        __tmp.put_f32_le(self.yaw);
17670        __tmp.put_f32_le(self.rollspeed);
17671        __tmp.put_f32_le(self.pitchspeed);
17672        __tmp.put_f32_le(self.yawspeed);
17673        __tmp.put_i32_le(self.lat);
17674        __tmp.put_i32_le(self.lon);
17675        __tmp.put_i32_le(self.alt);
17676        __tmp.put_i16_le(self.vx);
17677        __tmp.put_i16_le(self.vy);
17678        __tmp.put_i16_le(self.vz);
17679        __tmp.put_i16_le(self.xacc);
17680        __tmp.put_i16_le(self.yacc);
17681        __tmp.put_i16_le(self.zacc);
17682        if matches!(version, MavlinkVersion::V2) {
17683            let len = __tmp.len();
17684            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17685        } else {
17686            __tmp.len()
17687        }
17688    }
17689}
17690#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17691#[doc = ""]
17692#[doc = "ID: 115"]
17693#[derive(Debug, Clone, PartialEq)]
17694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17696#[cfg_attr(feature = "ts", derive(TS))]
17697#[cfg_attr(feature = "ts", ts(export))]
17698pub struct HIL_STATE_QUATERNION_DATA {
17699    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17700    pub time_usec: u64,
17701    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17703    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17704    pub attitude_quaternion: [f32; 4],
17705    #[doc = "Body frame roll / phi angular speed"]
17706    pub rollspeed: f32,
17707    #[doc = "Body frame pitch / theta angular speed"]
17708    pub pitchspeed: f32,
17709    #[doc = "Body frame yaw / psi angular speed"]
17710    pub yawspeed: f32,
17711    #[doc = "Latitude"]
17712    pub lat: i32,
17713    #[doc = "Longitude"]
17714    pub lon: i32,
17715    #[doc = "Altitude"]
17716    pub alt: i32,
17717    #[doc = "Ground X Speed (Latitude)"]
17718    pub vx: i16,
17719    #[doc = "Ground Y Speed (Longitude)"]
17720    pub vy: i16,
17721    #[doc = "Ground Z Speed (Altitude)"]
17722    pub vz: i16,
17723    #[doc = "Indicated airspeed"]
17724    pub ind_airspeed: u16,
17725    #[doc = "True airspeed"]
17726    pub true_airspeed: u16,
17727    #[doc = "X acceleration"]
17728    pub xacc: i16,
17729    #[doc = "Y acceleration"]
17730    pub yacc: i16,
17731    #[doc = "Z acceleration"]
17732    pub zacc: i16,
17733}
17734impl HIL_STATE_QUATERNION_DATA {
17735    pub const ENCODED_LEN: usize = 64usize;
17736    pub const DEFAULT: Self = Self {
17737        time_usec: 0_u64,
17738        attitude_quaternion: [0.0_f32; 4usize],
17739        rollspeed: 0.0_f32,
17740        pitchspeed: 0.0_f32,
17741        yawspeed: 0.0_f32,
17742        lat: 0_i32,
17743        lon: 0_i32,
17744        alt: 0_i32,
17745        vx: 0_i16,
17746        vy: 0_i16,
17747        vz: 0_i16,
17748        ind_airspeed: 0_u16,
17749        true_airspeed: 0_u16,
17750        xacc: 0_i16,
17751        yacc: 0_i16,
17752        zacc: 0_i16,
17753    };
17754    #[cfg(feature = "arbitrary")]
17755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17756        use arbitrary::{Arbitrary, Unstructured};
17757        let mut buf = [0u8; 1024];
17758        rng.fill_bytes(&mut buf);
17759        let mut unstructured = Unstructured::new(&buf);
17760        Self::arbitrary(&mut unstructured).unwrap_or_default()
17761    }
17762}
17763impl Default for HIL_STATE_QUATERNION_DATA {
17764    fn default() -> Self {
17765        Self::DEFAULT.clone()
17766    }
17767}
17768impl MessageData for HIL_STATE_QUATERNION_DATA {
17769    type Message = MavMessage;
17770    const ID: u32 = 115u32;
17771    const NAME: &'static str = "HIL_STATE_QUATERNION";
17772    const EXTRA_CRC: u8 = 4u8;
17773    const ENCODED_LEN: usize = 64usize;
17774    fn deser(
17775        _version: MavlinkVersion,
17776        __input: &[u8],
17777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17778        let avail_len = __input.len();
17779        let mut payload_buf = [0; Self::ENCODED_LEN];
17780        let mut buf = if avail_len < Self::ENCODED_LEN {
17781            payload_buf[0..avail_len].copy_from_slice(__input);
17782            Bytes::new(&payload_buf)
17783        } else {
17784            Bytes::new(__input)
17785        };
17786        let mut __struct = Self::default();
17787        __struct.time_usec = buf.get_u64_le();
17788        for v in &mut __struct.attitude_quaternion {
17789            let val = buf.get_f32_le();
17790            *v = val;
17791        }
17792        __struct.rollspeed = buf.get_f32_le();
17793        __struct.pitchspeed = buf.get_f32_le();
17794        __struct.yawspeed = buf.get_f32_le();
17795        __struct.lat = buf.get_i32_le();
17796        __struct.lon = buf.get_i32_le();
17797        __struct.alt = buf.get_i32_le();
17798        __struct.vx = buf.get_i16_le();
17799        __struct.vy = buf.get_i16_le();
17800        __struct.vz = buf.get_i16_le();
17801        __struct.ind_airspeed = buf.get_u16_le();
17802        __struct.true_airspeed = buf.get_u16_le();
17803        __struct.xacc = buf.get_i16_le();
17804        __struct.yacc = buf.get_i16_le();
17805        __struct.zacc = buf.get_i16_le();
17806        Ok(__struct)
17807    }
17808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17809        let mut __tmp = BytesMut::new(bytes);
17810        #[allow(clippy::absurd_extreme_comparisons)]
17811        #[allow(unused_comparisons)]
17812        if __tmp.remaining() < Self::ENCODED_LEN {
17813            panic!(
17814                "buffer is too small (need {} bytes, but got {})",
17815                Self::ENCODED_LEN,
17816                __tmp.remaining(),
17817            )
17818        }
17819        __tmp.put_u64_le(self.time_usec);
17820        for val in &self.attitude_quaternion {
17821            __tmp.put_f32_le(*val);
17822        }
17823        __tmp.put_f32_le(self.rollspeed);
17824        __tmp.put_f32_le(self.pitchspeed);
17825        __tmp.put_f32_le(self.yawspeed);
17826        __tmp.put_i32_le(self.lat);
17827        __tmp.put_i32_le(self.lon);
17828        __tmp.put_i32_le(self.alt);
17829        __tmp.put_i16_le(self.vx);
17830        __tmp.put_i16_le(self.vy);
17831        __tmp.put_i16_le(self.vz);
17832        __tmp.put_u16_le(self.ind_airspeed);
17833        __tmp.put_u16_le(self.true_airspeed);
17834        __tmp.put_i16_le(self.xacc);
17835        __tmp.put_i16_le(self.yacc);
17836        __tmp.put_i16_le(self.zacc);
17837        if matches!(version, MavlinkVersion::V2) {
17838            let len = __tmp.len();
17839            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17840        } else {
17841            __tmp.len()
17842        }
17843    }
17844}
17845#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17846#[doc = ""]
17847#[doc = "ID: 242"]
17848#[derive(Debug, Clone, PartialEq)]
17849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17851#[cfg_attr(feature = "ts", derive(TS))]
17852#[cfg_attr(feature = "ts", ts(export))]
17853pub struct HOME_POSITION_DATA {
17854    #[doc = "Latitude (WGS84)"]
17855    pub latitude: i32,
17856    #[doc = "Longitude (WGS84)"]
17857    pub longitude: i32,
17858    #[doc = "Altitude (MSL). Positive for up."]
17859    pub altitude: i32,
17860    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17861    pub x: f32,
17862    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17863    pub y: f32,
17864    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17865    pub z: f32,
17866    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17867    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17868    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17869    pub q: [f32; 4],
17870    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17871    pub approach_x: f32,
17872    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17873    pub approach_y: f32,
17874    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17875    pub approach_z: f32,
17876    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17878    pub time_usec: u64,
17879}
17880impl HOME_POSITION_DATA {
17881    pub const ENCODED_LEN: usize = 60usize;
17882    pub const DEFAULT: Self = Self {
17883        latitude: 0_i32,
17884        longitude: 0_i32,
17885        altitude: 0_i32,
17886        x: 0.0_f32,
17887        y: 0.0_f32,
17888        z: 0.0_f32,
17889        q: [0.0_f32; 4usize],
17890        approach_x: 0.0_f32,
17891        approach_y: 0.0_f32,
17892        approach_z: 0.0_f32,
17893        time_usec: 0_u64,
17894    };
17895    #[cfg(feature = "arbitrary")]
17896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17897        use arbitrary::{Arbitrary, Unstructured};
17898        let mut buf = [0u8; 1024];
17899        rng.fill_bytes(&mut buf);
17900        let mut unstructured = Unstructured::new(&buf);
17901        Self::arbitrary(&mut unstructured).unwrap_or_default()
17902    }
17903}
17904impl Default for HOME_POSITION_DATA {
17905    fn default() -> Self {
17906        Self::DEFAULT.clone()
17907    }
17908}
17909impl MessageData for HOME_POSITION_DATA {
17910    type Message = MavMessage;
17911    const ID: u32 = 242u32;
17912    const NAME: &'static str = "HOME_POSITION";
17913    const EXTRA_CRC: u8 = 104u8;
17914    const ENCODED_LEN: usize = 60usize;
17915    fn deser(
17916        _version: MavlinkVersion,
17917        __input: &[u8],
17918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17919        let avail_len = __input.len();
17920        let mut payload_buf = [0; Self::ENCODED_LEN];
17921        let mut buf = if avail_len < Self::ENCODED_LEN {
17922            payload_buf[0..avail_len].copy_from_slice(__input);
17923            Bytes::new(&payload_buf)
17924        } else {
17925            Bytes::new(__input)
17926        };
17927        let mut __struct = Self::default();
17928        __struct.latitude = buf.get_i32_le();
17929        __struct.longitude = buf.get_i32_le();
17930        __struct.altitude = buf.get_i32_le();
17931        __struct.x = buf.get_f32_le();
17932        __struct.y = buf.get_f32_le();
17933        __struct.z = buf.get_f32_le();
17934        for v in &mut __struct.q {
17935            let val = buf.get_f32_le();
17936            *v = val;
17937        }
17938        __struct.approach_x = buf.get_f32_le();
17939        __struct.approach_y = buf.get_f32_le();
17940        __struct.approach_z = buf.get_f32_le();
17941        __struct.time_usec = buf.get_u64_le();
17942        Ok(__struct)
17943    }
17944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17945        let mut __tmp = BytesMut::new(bytes);
17946        #[allow(clippy::absurd_extreme_comparisons)]
17947        #[allow(unused_comparisons)]
17948        if __tmp.remaining() < Self::ENCODED_LEN {
17949            panic!(
17950                "buffer is too small (need {} bytes, but got {})",
17951                Self::ENCODED_LEN,
17952                __tmp.remaining(),
17953            )
17954        }
17955        __tmp.put_i32_le(self.latitude);
17956        __tmp.put_i32_le(self.longitude);
17957        __tmp.put_i32_le(self.altitude);
17958        __tmp.put_f32_le(self.x);
17959        __tmp.put_f32_le(self.y);
17960        __tmp.put_f32_le(self.z);
17961        for val in &self.q {
17962            __tmp.put_f32_le(*val);
17963        }
17964        __tmp.put_f32_le(self.approach_x);
17965        __tmp.put_f32_le(self.approach_y);
17966        __tmp.put_f32_le(self.approach_z);
17967        if matches!(version, MavlinkVersion::V2) {
17968            __tmp.put_u64_le(self.time_usec);
17969            let len = __tmp.len();
17970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17971        } else {
17972            __tmp.len()
17973        }
17974    }
17975}
17976#[doc = "Temperature and humidity from hygrometer."]
17977#[doc = ""]
17978#[doc = "ID: 12920"]
17979#[derive(Debug, Clone, PartialEq)]
17980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17982#[cfg_attr(feature = "ts", derive(TS))]
17983#[cfg_attr(feature = "ts", ts(export))]
17984pub struct HYGROMETER_SENSOR_DATA {
17985    #[doc = "Temperature"]
17986    pub temperature: i16,
17987    #[doc = "Humidity"]
17988    pub humidity: u16,
17989    #[doc = "Hygrometer ID"]
17990    pub id: u8,
17991}
17992impl HYGROMETER_SENSOR_DATA {
17993    pub const ENCODED_LEN: usize = 5usize;
17994    pub const DEFAULT: Self = Self {
17995        temperature: 0_i16,
17996        humidity: 0_u16,
17997        id: 0_u8,
17998    };
17999    #[cfg(feature = "arbitrary")]
18000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18001        use arbitrary::{Arbitrary, Unstructured};
18002        let mut buf = [0u8; 1024];
18003        rng.fill_bytes(&mut buf);
18004        let mut unstructured = Unstructured::new(&buf);
18005        Self::arbitrary(&mut unstructured).unwrap_or_default()
18006    }
18007}
18008impl Default for HYGROMETER_SENSOR_DATA {
18009    fn default() -> Self {
18010        Self::DEFAULT.clone()
18011    }
18012}
18013impl MessageData for HYGROMETER_SENSOR_DATA {
18014    type Message = MavMessage;
18015    const ID: u32 = 12920u32;
18016    const NAME: &'static str = "HYGROMETER_SENSOR";
18017    const EXTRA_CRC: u8 = 20u8;
18018    const ENCODED_LEN: usize = 5usize;
18019    fn deser(
18020        _version: MavlinkVersion,
18021        __input: &[u8],
18022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18023        let avail_len = __input.len();
18024        let mut payload_buf = [0; Self::ENCODED_LEN];
18025        let mut buf = if avail_len < Self::ENCODED_LEN {
18026            payload_buf[0..avail_len].copy_from_slice(__input);
18027            Bytes::new(&payload_buf)
18028        } else {
18029            Bytes::new(__input)
18030        };
18031        let mut __struct = Self::default();
18032        __struct.temperature = buf.get_i16_le();
18033        __struct.humidity = buf.get_u16_le();
18034        __struct.id = buf.get_u8();
18035        Ok(__struct)
18036    }
18037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18038        let mut __tmp = BytesMut::new(bytes);
18039        #[allow(clippy::absurd_extreme_comparisons)]
18040        #[allow(unused_comparisons)]
18041        if __tmp.remaining() < Self::ENCODED_LEN {
18042            panic!(
18043                "buffer is too small (need {} bytes, but got {})",
18044                Self::ENCODED_LEN,
18045                __tmp.remaining(),
18046            )
18047        }
18048        __tmp.put_i16_le(self.temperature);
18049        __tmp.put_u16_le(self.humidity);
18050        __tmp.put_u8(self.id);
18051        if matches!(version, MavlinkVersion::V2) {
18052            let len = __tmp.len();
18053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18054        } else {
18055            __tmp.len()
18056        }
18057    }
18058}
18059#[doc = "Illuminator status."]
18060#[doc = ""]
18061#[doc = "ID: 440"]
18062#[derive(Debug, Clone, PartialEq)]
18063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18065#[cfg_attr(feature = "ts", derive(TS))]
18066#[cfg_attr(feature = "ts", ts(export))]
18067pub struct ILLUMINATOR_STATUS_DATA {
18068    #[doc = "Time since the start-up of the illuminator in ms"]
18069    pub uptime_ms: u32,
18070    #[doc = "Errors"]
18071    pub error_status: IlluminatorErrorFlags,
18072    #[doc = "Illuminator brightness"]
18073    pub brightness: f32,
18074    #[doc = "Illuminator strobing period in seconds"]
18075    pub strobe_period: f32,
18076    #[doc = "Illuminator strobing duty cycle"]
18077    pub strobe_duty_cycle: f32,
18078    #[doc = "Temperature in Celsius"]
18079    pub temp_c: f32,
18080    #[doc = "Minimum strobing period in seconds"]
18081    pub min_strobe_period: f32,
18082    #[doc = "Maximum strobing period in seconds"]
18083    pub max_strobe_period: f32,
18084    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
18085    pub enable: u8,
18086    #[doc = "Supported illuminator modes"]
18087    pub mode_bitmask: IlluminatorMode,
18088    #[doc = "Illuminator mode"]
18089    pub mode: IlluminatorMode,
18090}
18091impl ILLUMINATOR_STATUS_DATA {
18092    pub const ENCODED_LEN: usize = 35usize;
18093    pub const DEFAULT: Self = Self {
18094        uptime_ms: 0_u32,
18095        error_status: IlluminatorErrorFlags::DEFAULT,
18096        brightness: 0.0_f32,
18097        strobe_period: 0.0_f32,
18098        strobe_duty_cycle: 0.0_f32,
18099        temp_c: 0.0_f32,
18100        min_strobe_period: 0.0_f32,
18101        max_strobe_period: 0.0_f32,
18102        enable: 0_u8,
18103        mode_bitmask: IlluminatorMode::DEFAULT,
18104        mode: IlluminatorMode::DEFAULT,
18105    };
18106    #[cfg(feature = "arbitrary")]
18107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18108        use arbitrary::{Arbitrary, Unstructured};
18109        let mut buf = [0u8; 1024];
18110        rng.fill_bytes(&mut buf);
18111        let mut unstructured = Unstructured::new(&buf);
18112        Self::arbitrary(&mut unstructured).unwrap_or_default()
18113    }
18114}
18115impl Default for ILLUMINATOR_STATUS_DATA {
18116    fn default() -> Self {
18117        Self::DEFAULT.clone()
18118    }
18119}
18120impl MessageData for ILLUMINATOR_STATUS_DATA {
18121    type Message = MavMessage;
18122    const ID: u32 = 440u32;
18123    const NAME: &'static str = "ILLUMINATOR_STATUS";
18124    const EXTRA_CRC: u8 = 66u8;
18125    const ENCODED_LEN: usize = 35usize;
18126    fn deser(
18127        _version: MavlinkVersion,
18128        __input: &[u8],
18129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18130        let avail_len = __input.len();
18131        let mut payload_buf = [0; Self::ENCODED_LEN];
18132        let mut buf = if avail_len < Self::ENCODED_LEN {
18133            payload_buf[0..avail_len].copy_from_slice(__input);
18134            Bytes::new(&payload_buf)
18135        } else {
18136            Bytes::new(__input)
18137        };
18138        let mut __struct = Self::default();
18139        __struct.uptime_ms = buf.get_u32_le();
18140        let tmp = buf.get_u32_le();
18141        __struct.error_status = IlluminatorErrorFlags::from_bits(tmp).ok_or(
18142            ::mavlink_core::error::ParserError::InvalidFlag {
18143                flag_type: "IlluminatorErrorFlags",
18144                value: tmp as u64,
18145            },
18146        )?;
18147        __struct.brightness = buf.get_f32_le();
18148        __struct.strobe_period = buf.get_f32_le();
18149        __struct.strobe_duty_cycle = buf.get_f32_le();
18150        __struct.temp_c = buf.get_f32_le();
18151        __struct.min_strobe_period = buf.get_f32_le();
18152        __struct.max_strobe_period = buf.get_f32_le();
18153        __struct.enable = buf.get_u8();
18154        let tmp = buf.get_u8();
18155        __struct.mode_bitmask =
18156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18157                enum_type: "IlluminatorMode",
18158                value: tmp as u64,
18159            })?;
18160        let tmp = buf.get_u8();
18161        __struct.mode =
18162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18163                enum_type: "IlluminatorMode",
18164                value: tmp as u64,
18165            })?;
18166        Ok(__struct)
18167    }
18168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18169        let mut __tmp = BytesMut::new(bytes);
18170        #[allow(clippy::absurd_extreme_comparisons)]
18171        #[allow(unused_comparisons)]
18172        if __tmp.remaining() < Self::ENCODED_LEN {
18173            panic!(
18174                "buffer is too small (need {} bytes, but got {})",
18175                Self::ENCODED_LEN,
18176                __tmp.remaining(),
18177            )
18178        }
18179        __tmp.put_u32_le(self.uptime_ms);
18180        __tmp.put_u32_le(self.error_status.bits());
18181        __tmp.put_f32_le(self.brightness);
18182        __tmp.put_f32_le(self.strobe_period);
18183        __tmp.put_f32_le(self.strobe_duty_cycle);
18184        __tmp.put_f32_le(self.temp_c);
18185        __tmp.put_f32_le(self.min_strobe_period);
18186        __tmp.put_f32_le(self.max_strobe_period);
18187        __tmp.put_u8(self.enable);
18188        __tmp.put_u8(self.mode_bitmask as u8);
18189        __tmp.put_u8(self.mode as u8);
18190        if matches!(version, MavlinkVersion::V2) {
18191            let len = __tmp.len();
18192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18193        } else {
18194            __tmp.len()
18195        }
18196    }
18197}
18198#[doc = "Status of the Iridium SBD link."]
18199#[doc = ""]
18200#[doc = "ID: 335"]
18201#[derive(Debug, Clone, PartialEq)]
18202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18204#[cfg_attr(feature = "ts", derive(TS))]
18205#[cfg_attr(feature = "ts", ts(export))]
18206pub struct ISBD_LINK_STATUS_DATA {
18207    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18208    pub timestamp: u64,
18209    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18210    pub last_heartbeat: u64,
18211    #[doc = "Number of failed SBD sessions."]
18212    pub failed_sessions: u16,
18213    #[doc = "Number of successful SBD sessions."]
18214    pub successful_sessions: u16,
18215    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
18216    pub signal_quality: u8,
18217    #[doc = "1: Ring call pending, 0: No call pending."]
18218    pub ring_pending: u8,
18219    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
18220    pub tx_session_pending: u8,
18221    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
18222    pub rx_session_pending: u8,
18223}
18224impl ISBD_LINK_STATUS_DATA {
18225    pub const ENCODED_LEN: usize = 24usize;
18226    pub const DEFAULT: Self = Self {
18227        timestamp: 0_u64,
18228        last_heartbeat: 0_u64,
18229        failed_sessions: 0_u16,
18230        successful_sessions: 0_u16,
18231        signal_quality: 0_u8,
18232        ring_pending: 0_u8,
18233        tx_session_pending: 0_u8,
18234        rx_session_pending: 0_u8,
18235    };
18236    #[cfg(feature = "arbitrary")]
18237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18238        use arbitrary::{Arbitrary, Unstructured};
18239        let mut buf = [0u8; 1024];
18240        rng.fill_bytes(&mut buf);
18241        let mut unstructured = Unstructured::new(&buf);
18242        Self::arbitrary(&mut unstructured).unwrap_or_default()
18243    }
18244}
18245impl Default for ISBD_LINK_STATUS_DATA {
18246    fn default() -> Self {
18247        Self::DEFAULT.clone()
18248    }
18249}
18250impl MessageData for ISBD_LINK_STATUS_DATA {
18251    type Message = MavMessage;
18252    const ID: u32 = 335u32;
18253    const NAME: &'static str = "ISBD_LINK_STATUS";
18254    const EXTRA_CRC: u8 = 225u8;
18255    const ENCODED_LEN: usize = 24usize;
18256    fn deser(
18257        _version: MavlinkVersion,
18258        __input: &[u8],
18259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18260        let avail_len = __input.len();
18261        let mut payload_buf = [0; Self::ENCODED_LEN];
18262        let mut buf = if avail_len < Self::ENCODED_LEN {
18263            payload_buf[0..avail_len].copy_from_slice(__input);
18264            Bytes::new(&payload_buf)
18265        } else {
18266            Bytes::new(__input)
18267        };
18268        let mut __struct = Self::default();
18269        __struct.timestamp = buf.get_u64_le();
18270        __struct.last_heartbeat = buf.get_u64_le();
18271        __struct.failed_sessions = buf.get_u16_le();
18272        __struct.successful_sessions = buf.get_u16_le();
18273        __struct.signal_quality = buf.get_u8();
18274        __struct.ring_pending = buf.get_u8();
18275        __struct.tx_session_pending = buf.get_u8();
18276        __struct.rx_session_pending = buf.get_u8();
18277        Ok(__struct)
18278    }
18279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18280        let mut __tmp = BytesMut::new(bytes);
18281        #[allow(clippy::absurd_extreme_comparisons)]
18282        #[allow(unused_comparisons)]
18283        if __tmp.remaining() < Self::ENCODED_LEN {
18284            panic!(
18285                "buffer is too small (need {} bytes, but got {})",
18286                Self::ENCODED_LEN,
18287                __tmp.remaining(),
18288            )
18289        }
18290        __tmp.put_u64_le(self.timestamp);
18291        __tmp.put_u64_le(self.last_heartbeat);
18292        __tmp.put_u16_le(self.failed_sessions);
18293        __tmp.put_u16_le(self.successful_sessions);
18294        __tmp.put_u8(self.signal_quality);
18295        __tmp.put_u8(self.ring_pending);
18296        __tmp.put_u8(self.tx_session_pending);
18297        __tmp.put_u8(self.rx_session_pending);
18298        if matches!(version, MavlinkVersion::V2) {
18299            let len = __tmp.len();
18300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18301        } else {
18302            __tmp.len()
18303        }
18304    }
18305}
18306#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18307#[doc = ""]
18308#[doc = "ID: 149"]
18309#[derive(Debug, Clone, PartialEq)]
18310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18312#[cfg_attr(feature = "ts", derive(TS))]
18313#[cfg_attr(feature = "ts", ts(export))]
18314pub struct LANDING_TARGET_DATA {
18315    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18316    pub time_usec: u64,
18317    #[doc = "X-axis angular offset of the target from the center of the image"]
18318    pub angle_x: f32,
18319    #[doc = "Y-axis angular offset of the target from the center of the image"]
18320    pub angle_y: f32,
18321    #[doc = "Distance to the target from the vehicle"]
18322    pub distance: f32,
18323    #[doc = "Size of target along x-axis"]
18324    pub size_x: f32,
18325    #[doc = "Size of target along y-axis"]
18326    pub size_y: f32,
18327    #[doc = "The ID of the target if multiple targets are present"]
18328    pub target_num: u8,
18329    #[doc = "Coordinate frame used for following fields."]
18330    pub frame: MavFrame,
18331    #[doc = "X Position of the landing target in MAV_FRAME"]
18332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18333    pub x: f32,
18334    #[doc = "Y Position of the landing target in MAV_FRAME"]
18335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18336    pub y: f32,
18337    #[doc = "Z Position of the landing target in MAV_FRAME"]
18338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18339    pub z: f32,
18340    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18341    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18344    pub q: [f32; 4],
18345    #[doc = "Type of landing target"]
18346    #[cfg_attr(feature = "serde", serde(default))]
18347    pub mavtype: LandingTargetType,
18348    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18350    pub position_valid: u8,
18351}
18352impl LANDING_TARGET_DATA {
18353    pub const ENCODED_LEN: usize = 60usize;
18354    pub const DEFAULT: Self = Self {
18355        time_usec: 0_u64,
18356        angle_x: 0.0_f32,
18357        angle_y: 0.0_f32,
18358        distance: 0.0_f32,
18359        size_x: 0.0_f32,
18360        size_y: 0.0_f32,
18361        target_num: 0_u8,
18362        frame: MavFrame::DEFAULT,
18363        x: 0.0_f32,
18364        y: 0.0_f32,
18365        z: 0.0_f32,
18366        q: [0.0_f32; 4usize],
18367        mavtype: LandingTargetType::DEFAULT,
18368        position_valid: 0_u8,
18369    };
18370    #[cfg(feature = "arbitrary")]
18371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18372        use arbitrary::{Arbitrary, Unstructured};
18373        let mut buf = [0u8; 1024];
18374        rng.fill_bytes(&mut buf);
18375        let mut unstructured = Unstructured::new(&buf);
18376        Self::arbitrary(&mut unstructured).unwrap_or_default()
18377    }
18378}
18379impl Default for LANDING_TARGET_DATA {
18380    fn default() -> Self {
18381        Self::DEFAULT.clone()
18382    }
18383}
18384impl MessageData for LANDING_TARGET_DATA {
18385    type Message = MavMessage;
18386    const ID: u32 = 149u32;
18387    const NAME: &'static str = "LANDING_TARGET";
18388    const EXTRA_CRC: u8 = 200u8;
18389    const ENCODED_LEN: usize = 60usize;
18390    fn deser(
18391        _version: MavlinkVersion,
18392        __input: &[u8],
18393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18394        let avail_len = __input.len();
18395        let mut payload_buf = [0; Self::ENCODED_LEN];
18396        let mut buf = if avail_len < Self::ENCODED_LEN {
18397            payload_buf[0..avail_len].copy_from_slice(__input);
18398            Bytes::new(&payload_buf)
18399        } else {
18400            Bytes::new(__input)
18401        };
18402        let mut __struct = Self::default();
18403        __struct.time_usec = buf.get_u64_le();
18404        __struct.angle_x = buf.get_f32_le();
18405        __struct.angle_y = buf.get_f32_le();
18406        __struct.distance = buf.get_f32_le();
18407        __struct.size_x = buf.get_f32_le();
18408        __struct.size_y = buf.get_f32_le();
18409        __struct.target_num = buf.get_u8();
18410        let tmp = buf.get_u8();
18411        __struct.frame =
18412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18413                enum_type: "MavFrame",
18414                value: tmp as u64,
18415            })?;
18416        __struct.x = buf.get_f32_le();
18417        __struct.y = buf.get_f32_le();
18418        __struct.z = buf.get_f32_le();
18419        for v in &mut __struct.q {
18420            let val = buf.get_f32_le();
18421            *v = val;
18422        }
18423        let tmp = buf.get_u8();
18424        __struct.mavtype =
18425            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18426                enum_type: "LandingTargetType",
18427                value: tmp as u64,
18428            })?;
18429        __struct.position_valid = buf.get_u8();
18430        Ok(__struct)
18431    }
18432    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18433        let mut __tmp = BytesMut::new(bytes);
18434        #[allow(clippy::absurd_extreme_comparisons)]
18435        #[allow(unused_comparisons)]
18436        if __tmp.remaining() < Self::ENCODED_LEN {
18437            panic!(
18438                "buffer is too small (need {} bytes, but got {})",
18439                Self::ENCODED_LEN,
18440                __tmp.remaining(),
18441            )
18442        }
18443        __tmp.put_u64_le(self.time_usec);
18444        __tmp.put_f32_le(self.angle_x);
18445        __tmp.put_f32_le(self.angle_y);
18446        __tmp.put_f32_le(self.distance);
18447        __tmp.put_f32_le(self.size_x);
18448        __tmp.put_f32_le(self.size_y);
18449        __tmp.put_u8(self.target_num);
18450        __tmp.put_u8(self.frame as u8);
18451        if matches!(version, MavlinkVersion::V2) {
18452            __tmp.put_f32_le(self.x);
18453            __tmp.put_f32_le(self.y);
18454            __tmp.put_f32_le(self.z);
18455            for val in &self.q {
18456                __tmp.put_f32_le(*val);
18457            }
18458            __tmp.put_u8(self.mavtype as u8);
18459            __tmp.put_u8(self.position_valid);
18460            let len = __tmp.len();
18461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18462        } else {
18463            __tmp.len()
18464        }
18465    }
18466}
18467#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18468#[doc = ""]
18469#[doc = "ID: 8"]
18470#[derive(Debug, Clone, PartialEq)]
18471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18473#[cfg_attr(feature = "ts", derive(TS))]
18474#[cfg_attr(feature = "ts", ts(export))]
18475pub struct LINK_NODE_STATUS_DATA {
18476    #[doc = "Timestamp (time since system boot)."]
18477    pub timestamp: u64,
18478    #[doc = "Transmit rate"]
18479    pub tx_rate: u32,
18480    #[doc = "Receive rate"]
18481    pub rx_rate: u32,
18482    #[doc = "Messages sent"]
18483    pub messages_sent: u32,
18484    #[doc = "Messages received (estimated from counting seq)"]
18485    pub messages_received: u32,
18486    #[doc = "Messages lost (estimated from counting seq)"]
18487    pub messages_lost: u32,
18488    #[doc = "Number of bytes that could not be parsed correctly."]
18489    pub rx_parse_err: u16,
18490    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18491    pub tx_overflows: u16,
18492    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18493    pub rx_overflows: u16,
18494    #[doc = "Remaining free transmit buffer space"]
18495    pub tx_buf: u8,
18496    #[doc = "Remaining free receive buffer space"]
18497    pub rx_buf: u8,
18498}
18499impl LINK_NODE_STATUS_DATA {
18500    pub const ENCODED_LEN: usize = 36usize;
18501    pub const DEFAULT: Self = Self {
18502        timestamp: 0_u64,
18503        tx_rate: 0_u32,
18504        rx_rate: 0_u32,
18505        messages_sent: 0_u32,
18506        messages_received: 0_u32,
18507        messages_lost: 0_u32,
18508        rx_parse_err: 0_u16,
18509        tx_overflows: 0_u16,
18510        rx_overflows: 0_u16,
18511        tx_buf: 0_u8,
18512        rx_buf: 0_u8,
18513    };
18514    #[cfg(feature = "arbitrary")]
18515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18516        use arbitrary::{Arbitrary, Unstructured};
18517        let mut buf = [0u8; 1024];
18518        rng.fill_bytes(&mut buf);
18519        let mut unstructured = Unstructured::new(&buf);
18520        Self::arbitrary(&mut unstructured).unwrap_or_default()
18521    }
18522}
18523impl Default for LINK_NODE_STATUS_DATA {
18524    fn default() -> Self {
18525        Self::DEFAULT.clone()
18526    }
18527}
18528impl MessageData for LINK_NODE_STATUS_DATA {
18529    type Message = MavMessage;
18530    const ID: u32 = 8u32;
18531    const NAME: &'static str = "LINK_NODE_STATUS";
18532    const EXTRA_CRC: u8 = 117u8;
18533    const ENCODED_LEN: usize = 36usize;
18534    fn deser(
18535        _version: MavlinkVersion,
18536        __input: &[u8],
18537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18538        let avail_len = __input.len();
18539        let mut payload_buf = [0; Self::ENCODED_LEN];
18540        let mut buf = if avail_len < Self::ENCODED_LEN {
18541            payload_buf[0..avail_len].copy_from_slice(__input);
18542            Bytes::new(&payload_buf)
18543        } else {
18544            Bytes::new(__input)
18545        };
18546        let mut __struct = Self::default();
18547        __struct.timestamp = buf.get_u64_le();
18548        __struct.tx_rate = buf.get_u32_le();
18549        __struct.rx_rate = buf.get_u32_le();
18550        __struct.messages_sent = buf.get_u32_le();
18551        __struct.messages_received = buf.get_u32_le();
18552        __struct.messages_lost = buf.get_u32_le();
18553        __struct.rx_parse_err = buf.get_u16_le();
18554        __struct.tx_overflows = buf.get_u16_le();
18555        __struct.rx_overflows = buf.get_u16_le();
18556        __struct.tx_buf = buf.get_u8();
18557        __struct.rx_buf = buf.get_u8();
18558        Ok(__struct)
18559    }
18560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18561        let mut __tmp = BytesMut::new(bytes);
18562        #[allow(clippy::absurd_extreme_comparisons)]
18563        #[allow(unused_comparisons)]
18564        if __tmp.remaining() < Self::ENCODED_LEN {
18565            panic!(
18566                "buffer is too small (need {} bytes, but got {})",
18567                Self::ENCODED_LEN,
18568                __tmp.remaining(),
18569            )
18570        }
18571        __tmp.put_u64_le(self.timestamp);
18572        __tmp.put_u32_le(self.tx_rate);
18573        __tmp.put_u32_le(self.rx_rate);
18574        __tmp.put_u32_le(self.messages_sent);
18575        __tmp.put_u32_le(self.messages_received);
18576        __tmp.put_u32_le(self.messages_lost);
18577        __tmp.put_u16_le(self.rx_parse_err);
18578        __tmp.put_u16_le(self.tx_overflows);
18579        __tmp.put_u16_le(self.rx_overflows);
18580        __tmp.put_u8(self.tx_buf);
18581        __tmp.put_u8(self.rx_buf);
18582        if matches!(version, MavlinkVersion::V2) {
18583            let len = __tmp.len();
18584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18585        } else {
18586            __tmp.len()
18587        }
18588    }
18589}
18590#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18591#[doc = ""]
18592#[doc = "ID: 32"]
18593#[derive(Debug, Clone, PartialEq)]
18594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18596#[cfg_attr(feature = "ts", derive(TS))]
18597#[cfg_attr(feature = "ts", ts(export))]
18598pub struct LOCAL_POSITION_NED_DATA {
18599    #[doc = "Timestamp (time since system boot)."]
18600    pub time_boot_ms: u32,
18601    #[doc = "X Position"]
18602    pub x: f32,
18603    #[doc = "Y Position"]
18604    pub y: f32,
18605    #[doc = "Z Position"]
18606    pub z: f32,
18607    #[doc = "X Speed"]
18608    pub vx: f32,
18609    #[doc = "Y Speed"]
18610    pub vy: f32,
18611    #[doc = "Z Speed"]
18612    pub vz: f32,
18613}
18614impl LOCAL_POSITION_NED_DATA {
18615    pub const ENCODED_LEN: usize = 28usize;
18616    pub const DEFAULT: Self = Self {
18617        time_boot_ms: 0_u32,
18618        x: 0.0_f32,
18619        y: 0.0_f32,
18620        z: 0.0_f32,
18621        vx: 0.0_f32,
18622        vy: 0.0_f32,
18623        vz: 0.0_f32,
18624    };
18625    #[cfg(feature = "arbitrary")]
18626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18627        use arbitrary::{Arbitrary, Unstructured};
18628        let mut buf = [0u8; 1024];
18629        rng.fill_bytes(&mut buf);
18630        let mut unstructured = Unstructured::new(&buf);
18631        Self::arbitrary(&mut unstructured).unwrap_or_default()
18632    }
18633}
18634impl Default for LOCAL_POSITION_NED_DATA {
18635    fn default() -> Self {
18636        Self::DEFAULT.clone()
18637    }
18638}
18639impl MessageData for LOCAL_POSITION_NED_DATA {
18640    type Message = MavMessage;
18641    const ID: u32 = 32u32;
18642    const NAME: &'static str = "LOCAL_POSITION_NED";
18643    const EXTRA_CRC: u8 = 185u8;
18644    const ENCODED_LEN: usize = 28usize;
18645    fn deser(
18646        _version: MavlinkVersion,
18647        __input: &[u8],
18648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18649        let avail_len = __input.len();
18650        let mut payload_buf = [0; Self::ENCODED_LEN];
18651        let mut buf = if avail_len < Self::ENCODED_LEN {
18652            payload_buf[0..avail_len].copy_from_slice(__input);
18653            Bytes::new(&payload_buf)
18654        } else {
18655            Bytes::new(__input)
18656        };
18657        let mut __struct = Self::default();
18658        __struct.time_boot_ms = buf.get_u32_le();
18659        __struct.x = buf.get_f32_le();
18660        __struct.y = buf.get_f32_le();
18661        __struct.z = buf.get_f32_le();
18662        __struct.vx = buf.get_f32_le();
18663        __struct.vy = buf.get_f32_le();
18664        __struct.vz = buf.get_f32_le();
18665        Ok(__struct)
18666    }
18667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18668        let mut __tmp = BytesMut::new(bytes);
18669        #[allow(clippy::absurd_extreme_comparisons)]
18670        #[allow(unused_comparisons)]
18671        if __tmp.remaining() < Self::ENCODED_LEN {
18672            panic!(
18673                "buffer is too small (need {} bytes, but got {})",
18674                Self::ENCODED_LEN,
18675                __tmp.remaining(),
18676            )
18677        }
18678        __tmp.put_u32_le(self.time_boot_ms);
18679        __tmp.put_f32_le(self.x);
18680        __tmp.put_f32_le(self.y);
18681        __tmp.put_f32_le(self.z);
18682        __tmp.put_f32_le(self.vx);
18683        __tmp.put_f32_le(self.vy);
18684        __tmp.put_f32_le(self.vz);
18685        if matches!(version, MavlinkVersion::V2) {
18686            let len = __tmp.len();
18687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18688        } else {
18689            __tmp.len()
18690        }
18691    }
18692}
18693#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18694#[doc = ""]
18695#[doc = "ID: 64"]
18696#[derive(Debug, Clone, PartialEq)]
18697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18699#[cfg_attr(feature = "ts", derive(TS))]
18700#[cfg_attr(feature = "ts", ts(export))]
18701pub struct LOCAL_POSITION_NED_COV_DATA {
18702    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18703    pub time_usec: u64,
18704    #[doc = "X Position"]
18705    pub x: f32,
18706    #[doc = "Y Position"]
18707    pub y: f32,
18708    #[doc = "Z Position"]
18709    pub z: f32,
18710    #[doc = "X Speed"]
18711    pub vx: f32,
18712    #[doc = "Y Speed"]
18713    pub vy: f32,
18714    #[doc = "Z Speed"]
18715    pub vz: f32,
18716    #[doc = "X Acceleration"]
18717    pub ax: f32,
18718    #[doc = "Y Acceleration"]
18719    pub ay: f32,
18720    #[doc = "Z Acceleration"]
18721    pub az: f32,
18722    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18724    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18725    pub covariance: [f32; 45],
18726    #[doc = "Class id of the estimator this estimate originated from."]
18727    pub estimator_type: MavEstimatorType,
18728}
18729impl LOCAL_POSITION_NED_COV_DATA {
18730    pub const ENCODED_LEN: usize = 225usize;
18731    pub const DEFAULT: Self = Self {
18732        time_usec: 0_u64,
18733        x: 0.0_f32,
18734        y: 0.0_f32,
18735        z: 0.0_f32,
18736        vx: 0.0_f32,
18737        vy: 0.0_f32,
18738        vz: 0.0_f32,
18739        ax: 0.0_f32,
18740        ay: 0.0_f32,
18741        az: 0.0_f32,
18742        covariance: [0.0_f32; 45usize],
18743        estimator_type: MavEstimatorType::DEFAULT,
18744    };
18745    #[cfg(feature = "arbitrary")]
18746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18747        use arbitrary::{Arbitrary, Unstructured};
18748        let mut buf = [0u8; 1024];
18749        rng.fill_bytes(&mut buf);
18750        let mut unstructured = Unstructured::new(&buf);
18751        Self::arbitrary(&mut unstructured).unwrap_or_default()
18752    }
18753}
18754impl Default for LOCAL_POSITION_NED_COV_DATA {
18755    fn default() -> Self {
18756        Self::DEFAULT.clone()
18757    }
18758}
18759impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18760    type Message = MavMessage;
18761    const ID: u32 = 64u32;
18762    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18763    const EXTRA_CRC: u8 = 191u8;
18764    const ENCODED_LEN: usize = 225usize;
18765    fn deser(
18766        _version: MavlinkVersion,
18767        __input: &[u8],
18768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18769        let avail_len = __input.len();
18770        let mut payload_buf = [0; Self::ENCODED_LEN];
18771        let mut buf = if avail_len < Self::ENCODED_LEN {
18772            payload_buf[0..avail_len].copy_from_slice(__input);
18773            Bytes::new(&payload_buf)
18774        } else {
18775            Bytes::new(__input)
18776        };
18777        let mut __struct = Self::default();
18778        __struct.time_usec = buf.get_u64_le();
18779        __struct.x = buf.get_f32_le();
18780        __struct.y = buf.get_f32_le();
18781        __struct.z = buf.get_f32_le();
18782        __struct.vx = buf.get_f32_le();
18783        __struct.vy = buf.get_f32_le();
18784        __struct.vz = buf.get_f32_le();
18785        __struct.ax = buf.get_f32_le();
18786        __struct.ay = buf.get_f32_le();
18787        __struct.az = buf.get_f32_le();
18788        for v in &mut __struct.covariance {
18789            let val = buf.get_f32_le();
18790            *v = val;
18791        }
18792        let tmp = buf.get_u8();
18793        __struct.estimator_type =
18794            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18795                enum_type: "MavEstimatorType",
18796                value: tmp as u64,
18797            })?;
18798        Ok(__struct)
18799    }
18800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18801        let mut __tmp = BytesMut::new(bytes);
18802        #[allow(clippy::absurd_extreme_comparisons)]
18803        #[allow(unused_comparisons)]
18804        if __tmp.remaining() < Self::ENCODED_LEN {
18805            panic!(
18806                "buffer is too small (need {} bytes, but got {})",
18807                Self::ENCODED_LEN,
18808                __tmp.remaining(),
18809            )
18810        }
18811        __tmp.put_u64_le(self.time_usec);
18812        __tmp.put_f32_le(self.x);
18813        __tmp.put_f32_le(self.y);
18814        __tmp.put_f32_le(self.z);
18815        __tmp.put_f32_le(self.vx);
18816        __tmp.put_f32_le(self.vy);
18817        __tmp.put_f32_le(self.vz);
18818        __tmp.put_f32_le(self.ax);
18819        __tmp.put_f32_le(self.ay);
18820        __tmp.put_f32_le(self.az);
18821        for val in &self.covariance {
18822            __tmp.put_f32_le(*val);
18823        }
18824        __tmp.put_u8(self.estimator_type as u8);
18825        if matches!(version, MavlinkVersion::V2) {
18826            let len = __tmp.len();
18827            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18828        } else {
18829            __tmp.len()
18830        }
18831    }
18832}
18833#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18834#[doc = ""]
18835#[doc = "ID: 89"]
18836#[derive(Debug, Clone, PartialEq)]
18837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18839#[cfg_attr(feature = "ts", derive(TS))]
18840#[cfg_attr(feature = "ts", ts(export))]
18841pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18842    #[doc = "Timestamp (time since system boot)."]
18843    pub time_boot_ms: u32,
18844    #[doc = "X Position"]
18845    pub x: f32,
18846    #[doc = "Y Position"]
18847    pub y: f32,
18848    #[doc = "Z Position"]
18849    pub z: f32,
18850    #[doc = "Roll"]
18851    pub roll: f32,
18852    #[doc = "Pitch"]
18853    pub pitch: f32,
18854    #[doc = "Yaw"]
18855    pub yaw: f32,
18856}
18857impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18858    pub const ENCODED_LEN: usize = 28usize;
18859    pub const DEFAULT: Self = Self {
18860        time_boot_ms: 0_u32,
18861        x: 0.0_f32,
18862        y: 0.0_f32,
18863        z: 0.0_f32,
18864        roll: 0.0_f32,
18865        pitch: 0.0_f32,
18866        yaw: 0.0_f32,
18867    };
18868    #[cfg(feature = "arbitrary")]
18869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18870        use arbitrary::{Arbitrary, Unstructured};
18871        let mut buf = [0u8; 1024];
18872        rng.fill_bytes(&mut buf);
18873        let mut unstructured = Unstructured::new(&buf);
18874        Self::arbitrary(&mut unstructured).unwrap_or_default()
18875    }
18876}
18877impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18878    fn default() -> Self {
18879        Self::DEFAULT.clone()
18880    }
18881}
18882impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18883    type Message = MavMessage;
18884    const ID: u32 = 89u32;
18885    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18886    const EXTRA_CRC: u8 = 231u8;
18887    const ENCODED_LEN: usize = 28usize;
18888    fn deser(
18889        _version: MavlinkVersion,
18890        __input: &[u8],
18891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18892        let avail_len = __input.len();
18893        let mut payload_buf = [0; Self::ENCODED_LEN];
18894        let mut buf = if avail_len < Self::ENCODED_LEN {
18895            payload_buf[0..avail_len].copy_from_slice(__input);
18896            Bytes::new(&payload_buf)
18897        } else {
18898            Bytes::new(__input)
18899        };
18900        let mut __struct = Self::default();
18901        __struct.time_boot_ms = buf.get_u32_le();
18902        __struct.x = buf.get_f32_le();
18903        __struct.y = buf.get_f32_le();
18904        __struct.z = buf.get_f32_le();
18905        __struct.roll = buf.get_f32_le();
18906        __struct.pitch = buf.get_f32_le();
18907        __struct.yaw = buf.get_f32_le();
18908        Ok(__struct)
18909    }
18910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18911        let mut __tmp = BytesMut::new(bytes);
18912        #[allow(clippy::absurd_extreme_comparisons)]
18913        #[allow(unused_comparisons)]
18914        if __tmp.remaining() < Self::ENCODED_LEN {
18915            panic!(
18916                "buffer is too small (need {} bytes, but got {})",
18917                Self::ENCODED_LEN,
18918                __tmp.remaining(),
18919            )
18920        }
18921        __tmp.put_u32_le(self.time_boot_ms);
18922        __tmp.put_f32_le(self.x);
18923        __tmp.put_f32_le(self.y);
18924        __tmp.put_f32_le(self.z);
18925        __tmp.put_f32_le(self.roll);
18926        __tmp.put_f32_le(self.pitch);
18927        __tmp.put_f32_le(self.yaw);
18928        if matches!(version, MavlinkVersion::V2) {
18929            let len = __tmp.len();
18930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18931        } else {
18932            __tmp.len()
18933        }
18934    }
18935}
18936#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18937#[doc = ""]
18938#[doc = "ID: 268"]
18939#[derive(Debug, Clone, PartialEq)]
18940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18942#[cfg_attr(feature = "ts", derive(TS))]
18943#[cfg_attr(feature = "ts", ts(export))]
18944pub struct LOGGING_ACK_DATA {
18945    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18946    pub sequence: u16,
18947    #[doc = "system ID of the target"]
18948    pub target_system: u8,
18949    #[doc = "component ID of the target"]
18950    pub target_component: u8,
18951}
18952impl LOGGING_ACK_DATA {
18953    pub const ENCODED_LEN: usize = 4usize;
18954    pub const DEFAULT: Self = Self {
18955        sequence: 0_u16,
18956        target_system: 0_u8,
18957        target_component: 0_u8,
18958    };
18959    #[cfg(feature = "arbitrary")]
18960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18961        use arbitrary::{Arbitrary, Unstructured};
18962        let mut buf = [0u8; 1024];
18963        rng.fill_bytes(&mut buf);
18964        let mut unstructured = Unstructured::new(&buf);
18965        Self::arbitrary(&mut unstructured).unwrap_or_default()
18966    }
18967}
18968impl Default for LOGGING_ACK_DATA {
18969    fn default() -> Self {
18970        Self::DEFAULT.clone()
18971    }
18972}
18973impl MessageData for LOGGING_ACK_DATA {
18974    type Message = MavMessage;
18975    const ID: u32 = 268u32;
18976    const NAME: &'static str = "LOGGING_ACK";
18977    const EXTRA_CRC: u8 = 14u8;
18978    const ENCODED_LEN: usize = 4usize;
18979    fn deser(
18980        _version: MavlinkVersion,
18981        __input: &[u8],
18982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18983        let avail_len = __input.len();
18984        let mut payload_buf = [0; Self::ENCODED_LEN];
18985        let mut buf = if avail_len < Self::ENCODED_LEN {
18986            payload_buf[0..avail_len].copy_from_slice(__input);
18987            Bytes::new(&payload_buf)
18988        } else {
18989            Bytes::new(__input)
18990        };
18991        let mut __struct = Self::default();
18992        __struct.sequence = buf.get_u16_le();
18993        __struct.target_system = buf.get_u8();
18994        __struct.target_component = buf.get_u8();
18995        Ok(__struct)
18996    }
18997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18998        let mut __tmp = BytesMut::new(bytes);
18999        #[allow(clippy::absurd_extreme_comparisons)]
19000        #[allow(unused_comparisons)]
19001        if __tmp.remaining() < Self::ENCODED_LEN {
19002            panic!(
19003                "buffer is too small (need {} bytes, but got {})",
19004                Self::ENCODED_LEN,
19005                __tmp.remaining(),
19006            )
19007        }
19008        __tmp.put_u16_le(self.sequence);
19009        __tmp.put_u8(self.target_system);
19010        __tmp.put_u8(self.target_component);
19011        if matches!(version, MavlinkVersion::V2) {
19012            let len = __tmp.len();
19013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19014        } else {
19015            __tmp.len()
19016        }
19017    }
19018}
19019#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
19020#[doc = ""]
19021#[doc = "ID: 266"]
19022#[derive(Debug, Clone, PartialEq)]
19023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19025#[cfg_attr(feature = "ts", derive(TS))]
19026#[cfg_attr(feature = "ts", ts(export))]
19027pub struct LOGGING_DATA_DATA {
19028    #[doc = "sequence number (can wrap)"]
19029    pub sequence: u16,
19030    #[doc = "system ID of the target"]
19031    pub target_system: u8,
19032    #[doc = "component ID of the target"]
19033    pub target_component: u8,
19034    #[doc = "data length"]
19035    pub length: u8,
19036    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19037    pub first_message_offset: u8,
19038    #[doc = "logged data"]
19039    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19040    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19041    pub data: [u8; 249],
19042}
19043impl LOGGING_DATA_DATA {
19044    pub const ENCODED_LEN: usize = 255usize;
19045    pub const DEFAULT: Self = Self {
19046        sequence: 0_u16,
19047        target_system: 0_u8,
19048        target_component: 0_u8,
19049        length: 0_u8,
19050        first_message_offset: 0_u8,
19051        data: [0_u8; 249usize],
19052    };
19053    #[cfg(feature = "arbitrary")]
19054    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19055        use arbitrary::{Arbitrary, Unstructured};
19056        let mut buf = [0u8; 1024];
19057        rng.fill_bytes(&mut buf);
19058        let mut unstructured = Unstructured::new(&buf);
19059        Self::arbitrary(&mut unstructured).unwrap_or_default()
19060    }
19061}
19062impl Default for LOGGING_DATA_DATA {
19063    fn default() -> Self {
19064        Self::DEFAULT.clone()
19065    }
19066}
19067impl MessageData for LOGGING_DATA_DATA {
19068    type Message = MavMessage;
19069    const ID: u32 = 266u32;
19070    const NAME: &'static str = "LOGGING_DATA";
19071    const EXTRA_CRC: u8 = 193u8;
19072    const ENCODED_LEN: usize = 255usize;
19073    fn deser(
19074        _version: MavlinkVersion,
19075        __input: &[u8],
19076    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19077        let avail_len = __input.len();
19078        let mut payload_buf = [0; Self::ENCODED_LEN];
19079        let mut buf = if avail_len < Self::ENCODED_LEN {
19080            payload_buf[0..avail_len].copy_from_slice(__input);
19081            Bytes::new(&payload_buf)
19082        } else {
19083            Bytes::new(__input)
19084        };
19085        let mut __struct = Self::default();
19086        __struct.sequence = buf.get_u16_le();
19087        __struct.target_system = buf.get_u8();
19088        __struct.target_component = buf.get_u8();
19089        __struct.length = buf.get_u8();
19090        __struct.first_message_offset = buf.get_u8();
19091        for v in &mut __struct.data {
19092            let val = buf.get_u8();
19093            *v = val;
19094        }
19095        Ok(__struct)
19096    }
19097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19098        let mut __tmp = BytesMut::new(bytes);
19099        #[allow(clippy::absurd_extreme_comparisons)]
19100        #[allow(unused_comparisons)]
19101        if __tmp.remaining() < Self::ENCODED_LEN {
19102            panic!(
19103                "buffer is too small (need {} bytes, but got {})",
19104                Self::ENCODED_LEN,
19105                __tmp.remaining(),
19106            )
19107        }
19108        __tmp.put_u16_le(self.sequence);
19109        __tmp.put_u8(self.target_system);
19110        __tmp.put_u8(self.target_component);
19111        __tmp.put_u8(self.length);
19112        __tmp.put_u8(self.first_message_offset);
19113        for val in &self.data {
19114            __tmp.put_u8(*val);
19115        }
19116        if matches!(version, MavlinkVersion::V2) {
19117            let len = __tmp.len();
19118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19119        } else {
19120            __tmp.len()
19121        }
19122    }
19123}
19124#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
19125#[doc = ""]
19126#[doc = "ID: 267"]
19127#[derive(Debug, Clone, PartialEq)]
19128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19130#[cfg_attr(feature = "ts", derive(TS))]
19131#[cfg_attr(feature = "ts", ts(export))]
19132pub struct LOGGING_DATA_ACKED_DATA {
19133    #[doc = "sequence number (can wrap)"]
19134    pub sequence: u16,
19135    #[doc = "system ID of the target"]
19136    pub target_system: u8,
19137    #[doc = "component ID of the target"]
19138    pub target_component: u8,
19139    #[doc = "data length"]
19140    pub length: u8,
19141    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19142    pub first_message_offset: u8,
19143    #[doc = "logged data"]
19144    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19145    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19146    pub data: [u8; 249],
19147}
19148impl LOGGING_DATA_ACKED_DATA {
19149    pub const ENCODED_LEN: usize = 255usize;
19150    pub const DEFAULT: Self = Self {
19151        sequence: 0_u16,
19152        target_system: 0_u8,
19153        target_component: 0_u8,
19154        length: 0_u8,
19155        first_message_offset: 0_u8,
19156        data: [0_u8; 249usize],
19157    };
19158    #[cfg(feature = "arbitrary")]
19159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19160        use arbitrary::{Arbitrary, Unstructured};
19161        let mut buf = [0u8; 1024];
19162        rng.fill_bytes(&mut buf);
19163        let mut unstructured = Unstructured::new(&buf);
19164        Self::arbitrary(&mut unstructured).unwrap_or_default()
19165    }
19166}
19167impl Default for LOGGING_DATA_ACKED_DATA {
19168    fn default() -> Self {
19169        Self::DEFAULT.clone()
19170    }
19171}
19172impl MessageData for LOGGING_DATA_ACKED_DATA {
19173    type Message = MavMessage;
19174    const ID: u32 = 267u32;
19175    const NAME: &'static str = "LOGGING_DATA_ACKED";
19176    const EXTRA_CRC: u8 = 35u8;
19177    const ENCODED_LEN: usize = 255usize;
19178    fn deser(
19179        _version: MavlinkVersion,
19180        __input: &[u8],
19181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19182        let avail_len = __input.len();
19183        let mut payload_buf = [0; Self::ENCODED_LEN];
19184        let mut buf = if avail_len < Self::ENCODED_LEN {
19185            payload_buf[0..avail_len].copy_from_slice(__input);
19186            Bytes::new(&payload_buf)
19187        } else {
19188            Bytes::new(__input)
19189        };
19190        let mut __struct = Self::default();
19191        __struct.sequence = buf.get_u16_le();
19192        __struct.target_system = buf.get_u8();
19193        __struct.target_component = buf.get_u8();
19194        __struct.length = buf.get_u8();
19195        __struct.first_message_offset = buf.get_u8();
19196        for v in &mut __struct.data {
19197            let val = buf.get_u8();
19198            *v = val;
19199        }
19200        Ok(__struct)
19201    }
19202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19203        let mut __tmp = BytesMut::new(bytes);
19204        #[allow(clippy::absurd_extreme_comparisons)]
19205        #[allow(unused_comparisons)]
19206        if __tmp.remaining() < Self::ENCODED_LEN {
19207            panic!(
19208                "buffer is too small (need {} bytes, but got {})",
19209                Self::ENCODED_LEN,
19210                __tmp.remaining(),
19211            )
19212        }
19213        __tmp.put_u16_le(self.sequence);
19214        __tmp.put_u8(self.target_system);
19215        __tmp.put_u8(self.target_component);
19216        __tmp.put_u8(self.length);
19217        __tmp.put_u8(self.first_message_offset);
19218        for val in &self.data {
19219            __tmp.put_u8(*val);
19220        }
19221        if matches!(version, MavlinkVersion::V2) {
19222            let len = __tmp.len();
19223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19224        } else {
19225            __tmp.len()
19226        }
19227    }
19228}
19229#[doc = "Reply to LOG_REQUEST_DATA."]
19230#[doc = ""]
19231#[doc = "ID: 120"]
19232#[derive(Debug, Clone, PartialEq)]
19233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19235#[cfg_attr(feature = "ts", derive(TS))]
19236#[cfg_attr(feature = "ts", ts(export))]
19237pub struct LOG_DATA_DATA {
19238    #[doc = "Offset into the log"]
19239    pub ofs: u32,
19240    #[doc = "Log id (from LOG_ENTRY reply)"]
19241    pub id: u16,
19242    #[doc = "Number of bytes (zero for end of log)"]
19243    pub count: u8,
19244    #[doc = "log data"]
19245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19246    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19247    pub data: [u8; 90],
19248}
19249impl LOG_DATA_DATA {
19250    pub const ENCODED_LEN: usize = 97usize;
19251    pub const DEFAULT: Self = Self {
19252        ofs: 0_u32,
19253        id: 0_u16,
19254        count: 0_u8,
19255        data: [0_u8; 90usize],
19256    };
19257    #[cfg(feature = "arbitrary")]
19258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19259        use arbitrary::{Arbitrary, Unstructured};
19260        let mut buf = [0u8; 1024];
19261        rng.fill_bytes(&mut buf);
19262        let mut unstructured = Unstructured::new(&buf);
19263        Self::arbitrary(&mut unstructured).unwrap_or_default()
19264    }
19265}
19266impl Default for LOG_DATA_DATA {
19267    fn default() -> Self {
19268        Self::DEFAULT.clone()
19269    }
19270}
19271impl MessageData for LOG_DATA_DATA {
19272    type Message = MavMessage;
19273    const ID: u32 = 120u32;
19274    const NAME: &'static str = "LOG_DATA";
19275    const EXTRA_CRC: u8 = 134u8;
19276    const ENCODED_LEN: usize = 97usize;
19277    fn deser(
19278        _version: MavlinkVersion,
19279        __input: &[u8],
19280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19281        let avail_len = __input.len();
19282        let mut payload_buf = [0; Self::ENCODED_LEN];
19283        let mut buf = if avail_len < Self::ENCODED_LEN {
19284            payload_buf[0..avail_len].copy_from_slice(__input);
19285            Bytes::new(&payload_buf)
19286        } else {
19287            Bytes::new(__input)
19288        };
19289        let mut __struct = Self::default();
19290        __struct.ofs = buf.get_u32_le();
19291        __struct.id = buf.get_u16_le();
19292        __struct.count = buf.get_u8();
19293        for v in &mut __struct.data {
19294            let val = buf.get_u8();
19295            *v = val;
19296        }
19297        Ok(__struct)
19298    }
19299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19300        let mut __tmp = BytesMut::new(bytes);
19301        #[allow(clippy::absurd_extreme_comparisons)]
19302        #[allow(unused_comparisons)]
19303        if __tmp.remaining() < Self::ENCODED_LEN {
19304            panic!(
19305                "buffer is too small (need {} bytes, but got {})",
19306                Self::ENCODED_LEN,
19307                __tmp.remaining(),
19308            )
19309        }
19310        __tmp.put_u32_le(self.ofs);
19311        __tmp.put_u16_le(self.id);
19312        __tmp.put_u8(self.count);
19313        for val in &self.data {
19314            __tmp.put_u8(*val);
19315        }
19316        if matches!(version, MavlinkVersion::V2) {
19317            let len = __tmp.len();
19318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19319        } else {
19320            __tmp.len()
19321        }
19322    }
19323}
19324#[doc = "Reply to LOG_REQUEST_LIST."]
19325#[doc = ""]
19326#[doc = "ID: 118"]
19327#[derive(Debug, Clone, PartialEq)]
19328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19330#[cfg_attr(feature = "ts", derive(TS))]
19331#[cfg_attr(feature = "ts", ts(export))]
19332pub struct LOG_ENTRY_DATA {
19333    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19334    pub time_utc: u32,
19335    #[doc = "Size of the log (may be approximate)"]
19336    pub size: u32,
19337    #[doc = "Log id"]
19338    pub id: u16,
19339    #[doc = "Total number of logs"]
19340    pub num_logs: u16,
19341    #[doc = "High log number"]
19342    pub last_log_num: u16,
19343}
19344impl LOG_ENTRY_DATA {
19345    pub const ENCODED_LEN: usize = 14usize;
19346    pub const DEFAULT: Self = Self {
19347        time_utc: 0_u32,
19348        size: 0_u32,
19349        id: 0_u16,
19350        num_logs: 0_u16,
19351        last_log_num: 0_u16,
19352    };
19353    #[cfg(feature = "arbitrary")]
19354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19355        use arbitrary::{Arbitrary, Unstructured};
19356        let mut buf = [0u8; 1024];
19357        rng.fill_bytes(&mut buf);
19358        let mut unstructured = Unstructured::new(&buf);
19359        Self::arbitrary(&mut unstructured).unwrap_or_default()
19360    }
19361}
19362impl Default for LOG_ENTRY_DATA {
19363    fn default() -> Self {
19364        Self::DEFAULT.clone()
19365    }
19366}
19367impl MessageData for LOG_ENTRY_DATA {
19368    type Message = MavMessage;
19369    const ID: u32 = 118u32;
19370    const NAME: &'static str = "LOG_ENTRY";
19371    const EXTRA_CRC: u8 = 56u8;
19372    const ENCODED_LEN: usize = 14usize;
19373    fn deser(
19374        _version: MavlinkVersion,
19375        __input: &[u8],
19376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19377        let avail_len = __input.len();
19378        let mut payload_buf = [0; Self::ENCODED_LEN];
19379        let mut buf = if avail_len < Self::ENCODED_LEN {
19380            payload_buf[0..avail_len].copy_from_slice(__input);
19381            Bytes::new(&payload_buf)
19382        } else {
19383            Bytes::new(__input)
19384        };
19385        let mut __struct = Self::default();
19386        __struct.time_utc = buf.get_u32_le();
19387        __struct.size = buf.get_u32_le();
19388        __struct.id = buf.get_u16_le();
19389        __struct.num_logs = buf.get_u16_le();
19390        __struct.last_log_num = buf.get_u16_le();
19391        Ok(__struct)
19392    }
19393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19394        let mut __tmp = BytesMut::new(bytes);
19395        #[allow(clippy::absurd_extreme_comparisons)]
19396        #[allow(unused_comparisons)]
19397        if __tmp.remaining() < Self::ENCODED_LEN {
19398            panic!(
19399                "buffer is too small (need {} bytes, but got {})",
19400                Self::ENCODED_LEN,
19401                __tmp.remaining(),
19402            )
19403        }
19404        __tmp.put_u32_le(self.time_utc);
19405        __tmp.put_u32_le(self.size);
19406        __tmp.put_u16_le(self.id);
19407        __tmp.put_u16_le(self.num_logs);
19408        __tmp.put_u16_le(self.last_log_num);
19409        if matches!(version, MavlinkVersion::V2) {
19410            let len = __tmp.len();
19411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19412        } else {
19413            __tmp.len()
19414        }
19415    }
19416}
19417#[doc = "Erase all logs."]
19418#[doc = ""]
19419#[doc = "ID: 121"]
19420#[derive(Debug, Clone, PartialEq)]
19421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19423#[cfg_attr(feature = "ts", derive(TS))]
19424#[cfg_attr(feature = "ts", ts(export))]
19425pub struct LOG_ERASE_DATA {
19426    #[doc = "System ID"]
19427    pub target_system: u8,
19428    #[doc = "Component ID"]
19429    pub target_component: u8,
19430}
19431impl LOG_ERASE_DATA {
19432    pub const ENCODED_LEN: usize = 2usize;
19433    pub const DEFAULT: Self = Self {
19434        target_system: 0_u8,
19435        target_component: 0_u8,
19436    };
19437    #[cfg(feature = "arbitrary")]
19438    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19439        use arbitrary::{Arbitrary, Unstructured};
19440        let mut buf = [0u8; 1024];
19441        rng.fill_bytes(&mut buf);
19442        let mut unstructured = Unstructured::new(&buf);
19443        Self::arbitrary(&mut unstructured).unwrap_or_default()
19444    }
19445}
19446impl Default for LOG_ERASE_DATA {
19447    fn default() -> Self {
19448        Self::DEFAULT.clone()
19449    }
19450}
19451impl MessageData for LOG_ERASE_DATA {
19452    type Message = MavMessage;
19453    const ID: u32 = 121u32;
19454    const NAME: &'static str = "LOG_ERASE";
19455    const EXTRA_CRC: u8 = 237u8;
19456    const ENCODED_LEN: usize = 2usize;
19457    fn deser(
19458        _version: MavlinkVersion,
19459        __input: &[u8],
19460    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19461        let avail_len = __input.len();
19462        let mut payload_buf = [0; Self::ENCODED_LEN];
19463        let mut buf = if avail_len < Self::ENCODED_LEN {
19464            payload_buf[0..avail_len].copy_from_slice(__input);
19465            Bytes::new(&payload_buf)
19466        } else {
19467            Bytes::new(__input)
19468        };
19469        let mut __struct = Self::default();
19470        __struct.target_system = buf.get_u8();
19471        __struct.target_component = buf.get_u8();
19472        Ok(__struct)
19473    }
19474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19475        let mut __tmp = BytesMut::new(bytes);
19476        #[allow(clippy::absurd_extreme_comparisons)]
19477        #[allow(unused_comparisons)]
19478        if __tmp.remaining() < Self::ENCODED_LEN {
19479            panic!(
19480                "buffer is too small (need {} bytes, but got {})",
19481                Self::ENCODED_LEN,
19482                __tmp.remaining(),
19483            )
19484        }
19485        __tmp.put_u8(self.target_system);
19486        __tmp.put_u8(self.target_component);
19487        if matches!(version, MavlinkVersion::V2) {
19488            let len = __tmp.len();
19489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19490        } else {
19491            __tmp.len()
19492        }
19493    }
19494}
19495#[doc = "Request a chunk of a log."]
19496#[doc = ""]
19497#[doc = "ID: 119"]
19498#[derive(Debug, Clone, PartialEq)]
19499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19501#[cfg_attr(feature = "ts", derive(TS))]
19502#[cfg_attr(feature = "ts", ts(export))]
19503pub struct LOG_REQUEST_DATA_DATA {
19504    #[doc = "Offset into the log"]
19505    pub ofs: u32,
19506    #[doc = "Number of bytes"]
19507    pub count: u32,
19508    #[doc = "Log id (from LOG_ENTRY reply)"]
19509    pub id: u16,
19510    #[doc = "System ID"]
19511    pub target_system: u8,
19512    #[doc = "Component ID"]
19513    pub target_component: u8,
19514}
19515impl LOG_REQUEST_DATA_DATA {
19516    pub const ENCODED_LEN: usize = 12usize;
19517    pub const DEFAULT: Self = Self {
19518        ofs: 0_u32,
19519        count: 0_u32,
19520        id: 0_u16,
19521        target_system: 0_u8,
19522        target_component: 0_u8,
19523    };
19524    #[cfg(feature = "arbitrary")]
19525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19526        use arbitrary::{Arbitrary, Unstructured};
19527        let mut buf = [0u8; 1024];
19528        rng.fill_bytes(&mut buf);
19529        let mut unstructured = Unstructured::new(&buf);
19530        Self::arbitrary(&mut unstructured).unwrap_or_default()
19531    }
19532}
19533impl Default for LOG_REQUEST_DATA_DATA {
19534    fn default() -> Self {
19535        Self::DEFAULT.clone()
19536    }
19537}
19538impl MessageData for LOG_REQUEST_DATA_DATA {
19539    type Message = MavMessage;
19540    const ID: u32 = 119u32;
19541    const NAME: &'static str = "LOG_REQUEST_DATA";
19542    const EXTRA_CRC: u8 = 116u8;
19543    const ENCODED_LEN: usize = 12usize;
19544    fn deser(
19545        _version: MavlinkVersion,
19546        __input: &[u8],
19547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19548        let avail_len = __input.len();
19549        let mut payload_buf = [0; Self::ENCODED_LEN];
19550        let mut buf = if avail_len < Self::ENCODED_LEN {
19551            payload_buf[0..avail_len].copy_from_slice(__input);
19552            Bytes::new(&payload_buf)
19553        } else {
19554            Bytes::new(__input)
19555        };
19556        let mut __struct = Self::default();
19557        __struct.ofs = buf.get_u32_le();
19558        __struct.count = buf.get_u32_le();
19559        __struct.id = buf.get_u16_le();
19560        __struct.target_system = buf.get_u8();
19561        __struct.target_component = buf.get_u8();
19562        Ok(__struct)
19563    }
19564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19565        let mut __tmp = BytesMut::new(bytes);
19566        #[allow(clippy::absurd_extreme_comparisons)]
19567        #[allow(unused_comparisons)]
19568        if __tmp.remaining() < Self::ENCODED_LEN {
19569            panic!(
19570                "buffer is too small (need {} bytes, but got {})",
19571                Self::ENCODED_LEN,
19572                __tmp.remaining(),
19573            )
19574        }
19575        __tmp.put_u32_le(self.ofs);
19576        __tmp.put_u32_le(self.count);
19577        __tmp.put_u16_le(self.id);
19578        __tmp.put_u8(self.target_system);
19579        __tmp.put_u8(self.target_component);
19580        if matches!(version, MavlinkVersion::V2) {
19581            let len = __tmp.len();
19582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19583        } else {
19584            __tmp.len()
19585        }
19586    }
19587}
19588#[doc = "Stop log transfer and resume normal logging."]
19589#[doc = ""]
19590#[doc = "ID: 122"]
19591#[derive(Debug, Clone, PartialEq)]
19592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19594#[cfg_attr(feature = "ts", derive(TS))]
19595#[cfg_attr(feature = "ts", ts(export))]
19596pub struct LOG_REQUEST_END_DATA {
19597    #[doc = "System ID"]
19598    pub target_system: u8,
19599    #[doc = "Component ID"]
19600    pub target_component: u8,
19601}
19602impl LOG_REQUEST_END_DATA {
19603    pub const ENCODED_LEN: usize = 2usize;
19604    pub const DEFAULT: Self = Self {
19605        target_system: 0_u8,
19606        target_component: 0_u8,
19607    };
19608    #[cfg(feature = "arbitrary")]
19609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19610        use arbitrary::{Arbitrary, Unstructured};
19611        let mut buf = [0u8; 1024];
19612        rng.fill_bytes(&mut buf);
19613        let mut unstructured = Unstructured::new(&buf);
19614        Self::arbitrary(&mut unstructured).unwrap_or_default()
19615    }
19616}
19617impl Default for LOG_REQUEST_END_DATA {
19618    fn default() -> Self {
19619        Self::DEFAULT.clone()
19620    }
19621}
19622impl MessageData for LOG_REQUEST_END_DATA {
19623    type Message = MavMessage;
19624    const ID: u32 = 122u32;
19625    const NAME: &'static str = "LOG_REQUEST_END";
19626    const EXTRA_CRC: u8 = 203u8;
19627    const ENCODED_LEN: usize = 2usize;
19628    fn deser(
19629        _version: MavlinkVersion,
19630        __input: &[u8],
19631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19632        let avail_len = __input.len();
19633        let mut payload_buf = [0; Self::ENCODED_LEN];
19634        let mut buf = if avail_len < Self::ENCODED_LEN {
19635            payload_buf[0..avail_len].copy_from_slice(__input);
19636            Bytes::new(&payload_buf)
19637        } else {
19638            Bytes::new(__input)
19639        };
19640        let mut __struct = Self::default();
19641        __struct.target_system = buf.get_u8();
19642        __struct.target_component = buf.get_u8();
19643        Ok(__struct)
19644    }
19645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19646        let mut __tmp = BytesMut::new(bytes);
19647        #[allow(clippy::absurd_extreme_comparisons)]
19648        #[allow(unused_comparisons)]
19649        if __tmp.remaining() < Self::ENCODED_LEN {
19650            panic!(
19651                "buffer is too small (need {} bytes, but got {})",
19652                Self::ENCODED_LEN,
19653                __tmp.remaining(),
19654            )
19655        }
19656        __tmp.put_u8(self.target_system);
19657        __tmp.put_u8(self.target_component);
19658        if matches!(version, MavlinkVersion::V2) {
19659            let len = __tmp.len();
19660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19661        } else {
19662            __tmp.len()
19663        }
19664    }
19665}
19666#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19667#[doc = ""]
19668#[doc = "ID: 117"]
19669#[derive(Debug, Clone, PartialEq)]
19670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19672#[cfg_attr(feature = "ts", derive(TS))]
19673#[cfg_attr(feature = "ts", ts(export))]
19674pub struct LOG_REQUEST_LIST_DATA {
19675    #[doc = "First log id (0 for first available)"]
19676    pub start: u16,
19677    #[doc = "Last log id (0xffff for last available)"]
19678    pub end: u16,
19679    #[doc = "System ID"]
19680    pub target_system: u8,
19681    #[doc = "Component ID"]
19682    pub target_component: u8,
19683}
19684impl LOG_REQUEST_LIST_DATA {
19685    pub const ENCODED_LEN: usize = 6usize;
19686    pub const DEFAULT: Self = Self {
19687        start: 0_u16,
19688        end: 0_u16,
19689        target_system: 0_u8,
19690        target_component: 0_u8,
19691    };
19692    #[cfg(feature = "arbitrary")]
19693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19694        use arbitrary::{Arbitrary, Unstructured};
19695        let mut buf = [0u8; 1024];
19696        rng.fill_bytes(&mut buf);
19697        let mut unstructured = Unstructured::new(&buf);
19698        Self::arbitrary(&mut unstructured).unwrap_or_default()
19699    }
19700}
19701impl Default for LOG_REQUEST_LIST_DATA {
19702    fn default() -> Self {
19703        Self::DEFAULT.clone()
19704    }
19705}
19706impl MessageData for LOG_REQUEST_LIST_DATA {
19707    type Message = MavMessage;
19708    const ID: u32 = 117u32;
19709    const NAME: &'static str = "LOG_REQUEST_LIST";
19710    const EXTRA_CRC: u8 = 128u8;
19711    const ENCODED_LEN: usize = 6usize;
19712    fn deser(
19713        _version: MavlinkVersion,
19714        __input: &[u8],
19715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19716        let avail_len = __input.len();
19717        let mut payload_buf = [0; Self::ENCODED_LEN];
19718        let mut buf = if avail_len < Self::ENCODED_LEN {
19719            payload_buf[0..avail_len].copy_from_slice(__input);
19720            Bytes::new(&payload_buf)
19721        } else {
19722            Bytes::new(__input)
19723        };
19724        let mut __struct = Self::default();
19725        __struct.start = buf.get_u16_le();
19726        __struct.end = buf.get_u16_le();
19727        __struct.target_system = buf.get_u8();
19728        __struct.target_component = buf.get_u8();
19729        Ok(__struct)
19730    }
19731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19732        let mut __tmp = BytesMut::new(bytes);
19733        #[allow(clippy::absurd_extreme_comparisons)]
19734        #[allow(unused_comparisons)]
19735        if __tmp.remaining() < Self::ENCODED_LEN {
19736            panic!(
19737                "buffer is too small (need {} bytes, but got {})",
19738                Self::ENCODED_LEN,
19739                __tmp.remaining(),
19740            )
19741        }
19742        __tmp.put_u16_le(self.start);
19743        __tmp.put_u16_le(self.end);
19744        __tmp.put_u8(self.target_system);
19745        __tmp.put_u8(self.target_component);
19746        if matches!(version, MavlinkVersion::V2) {
19747            let len = __tmp.len();
19748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19749        } else {
19750            __tmp.len()
19751        }
19752    }
19753}
19754#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19755#[doc = ""]
19756#[doc = "ID: 192"]
19757#[derive(Debug, Clone, PartialEq)]
19758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19760#[cfg_attr(feature = "ts", derive(TS))]
19761#[cfg_attr(feature = "ts", ts(export))]
19762pub struct MAG_CAL_REPORT_DATA {
19763    #[doc = "RMS milligauss residuals."]
19764    pub fitness: f32,
19765    #[doc = "X offset."]
19766    pub ofs_x: f32,
19767    #[doc = "Y offset."]
19768    pub ofs_y: f32,
19769    #[doc = "Z offset."]
19770    pub ofs_z: f32,
19771    #[doc = "X diagonal (matrix 11)."]
19772    pub diag_x: f32,
19773    #[doc = "Y diagonal (matrix 22)."]
19774    pub diag_y: f32,
19775    #[doc = "Z diagonal (matrix 33)."]
19776    pub diag_z: f32,
19777    #[doc = "X off-diagonal (matrix 12 and 21)."]
19778    pub offdiag_x: f32,
19779    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19780    pub offdiag_y: f32,
19781    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19782    pub offdiag_z: f32,
19783    #[doc = "Compass being calibrated."]
19784    pub compass_id: u8,
19785    #[doc = "Bitmask of compasses being calibrated."]
19786    pub cal_mask: u8,
19787    #[doc = "Calibration Status."]
19788    pub cal_status: MagCalStatus,
19789    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19790    pub autosaved: u8,
19791    #[doc = "Confidence in orientation (higher is better)."]
19792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19793    pub orientation_confidence: f32,
19794    #[doc = "orientation before calibration."]
19795    #[cfg_attr(feature = "serde", serde(default))]
19796    pub old_orientation: MavSensorOrientation,
19797    #[doc = "orientation after calibration."]
19798    #[cfg_attr(feature = "serde", serde(default))]
19799    pub new_orientation: MavSensorOrientation,
19800    #[doc = "field radius correction factor"]
19801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19802    pub scale_factor: f32,
19803}
19804impl MAG_CAL_REPORT_DATA {
19805    pub const ENCODED_LEN: usize = 54usize;
19806    pub const DEFAULT: Self = Self {
19807        fitness: 0.0_f32,
19808        ofs_x: 0.0_f32,
19809        ofs_y: 0.0_f32,
19810        ofs_z: 0.0_f32,
19811        diag_x: 0.0_f32,
19812        diag_y: 0.0_f32,
19813        diag_z: 0.0_f32,
19814        offdiag_x: 0.0_f32,
19815        offdiag_y: 0.0_f32,
19816        offdiag_z: 0.0_f32,
19817        compass_id: 0_u8,
19818        cal_mask: 0_u8,
19819        cal_status: MagCalStatus::DEFAULT,
19820        autosaved: 0_u8,
19821        orientation_confidence: 0.0_f32,
19822        old_orientation: MavSensorOrientation::DEFAULT,
19823        new_orientation: MavSensorOrientation::DEFAULT,
19824        scale_factor: 0.0_f32,
19825    };
19826    #[cfg(feature = "arbitrary")]
19827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19828        use arbitrary::{Arbitrary, Unstructured};
19829        let mut buf = [0u8; 1024];
19830        rng.fill_bytes(&mut buf);
19831        let mut unstructured = Unstructured::new(&buf);
19832        Self::arbitrary(&mut unstructured).unwrap_or_default()
19833    }
19834}
19835impl Default for MAG_CAL_REPORT_DATA {
19836    fn default() -> Self {
19837        Self::DEFAULT.clone()
19838    }
19839}
19840impl MessageData for MAG_CAL_REPORT_DATA {
19841    type Message = MavMessage;
19842    const ID: u32 = 192u32;
19843    const NAME: &'static str = "MAG_CAL_REPORT";
19844    const EXTRA_CRC: u8 = 36u8;
19845    const ENCODED_LEN: usize = 54usize;
19846    fn deser(
19847        _version: MavlinkVersion,
19848        __input: &[u8],
19849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19850        let avail_len = __input.len();
19851        let mut payload_buf = [0; Self::ENCODED_LEN];
19852        let mut buf = if avail_len < Self::ENCODED_LEN {
19853            payload_buf[0..avail_len].copy_from_slice(__input);
19854            Bytes::new(&payload_buf)
19855        } else {
19856            Bytes::new(__input)
19857        };
19858        let mut __struct = Self::default();
19859        __struct.fitness = buf.get_f32_le();
19860        __struct.ofs_x = buf.get_f32_le();
19861        __struct.ofs_y = buf.get_f32_le();
19862        __struct.ofs_z = buf.get_f32_le();
19863        __struct.diag_x = buf.get_f32_le();
19864        __struct.diag_y = buf.get_f32_le();
19865        __struct.diag_z = buf.get_f32_le();
19866        __struct.offdiag_x = buf.get_f32_le();
19867        __struct.offdiag_y = buf.get_f32_le();
19868        __struct.offdiag_z = buf.get_f32_le();
19869        __struct.compass_id = buf.get_u8();
19870        __struct.cal_mask = buf.get_u8();
19871        let tmp = buf.get_u8();
19872        __struct.cal_status =
19873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19874                enum_type: "MagCalStatus",
19875                value: tmp as u64,
19876            })?;
19877        __struct.autosaved = buf.get_u8();
19878        __struct.orientation_confidence = buf.get_f32_le();
19879        let tmp = buf.get_u8();
19880        __struct.old_orientation =
19881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19882                enum_type: "MavSensorOrientation",
19883                value: tmp as u64,
19884            })?;
19885        let tmp = buf.get_u8();
19886        __struct.new_orientation =
19887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19888                enum_type: "MavSensorOrientation",
19889                value: tmp as u64,
19890            })?;
19891        __struct.scale_factor = buf.get_f32_le();
19892        Ok(__struct)
19893    }
19894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19895        let mut __tmp = BytesMut::new(bytes);
19896        #[allow(clippy::absurd_extreme_comparisons)]
19897        #[allow(unused_comparisons)]
19898        if __tmp.remaining() < Self::ENCODED_LEN {
19899            panic!(
19900                "buffer is too small (need {} bytes, but got {})",
19901                Self::ENCODED_LEN,
19902                __tmp.remaining(),
19903            )
19904        }
19905        __tmp.put_f32_le(self.fitness);
19906        __tmp.put_f32_le(self.ofs_x);
19907        __tmp.put_f32_le(self.ofs_y);
19908        __tmp.put_f32_le(self.ofs_z);
19909        __tmp.put_f32_le(self.diag_x);
19910        __tmp.put_f32_le(self.diag_y);
19911        __tmp.put_f32_le(self.diag_z);
19912        __tmp.put_f32_le(self.offdiag_x);
19913        __tmp.put_f32_le(self.offdiag_y);
19914        __tmp.put_f32_le(self.offdiag_z);
19915        __tmp.put_u8(self.compass_id);
19916        __tmp.put_u8(self.cal_mask);
19917        __tmp.put_u8(self.cal_status as u8);
19918        __tmp.put_u8(self.autosaved);
19919        if matches!(version, MavlinkVersion::V2) {
19920            __tmp.put_f32_le(self.orientation_confidence);
19921            __tmp.put_u8(self.old_orientation as u8);
19922            __tmp.put_u8(self.new_orientation as u8);
19923            __tmp.put_f32_le(self.scale_factor);
19924            let len = __tmp.len();
19925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19926        } else {
19927            __tmp.len()
19928        }
19929    }
19930}
19931#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19932#[doc = ""]
19933#[doc = "ID: 69"]
19934#[derive(Debug, Clone, PartialEq)]
19935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19937#[cfg_attr(feature = "ts", derive(TS))]
19938#[cfg_attr(feature = "ts", ts(export))]
19939pub struct MANUAL_CONTROL_DATA {
19940    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19941    pub x: i16,
19942    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19943    pub y: i16,
19944    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19945    pub z: i16,
19946    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19947    pub r: i16,
19948    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19949    pub buttons: u16,
19950    #[doc = "The system to be controlled."]
19951    pub target: u8,
19952    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19954    pub buttons2: u16,
19955    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19957    pub enabled_extensions: u8,
19958    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19959    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19960    pub s: i16,
19961    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19963    pub t: i16,
19964    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19965    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19966    pub aux1: i16,
19967    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19969    pub aux2: i16,
19970    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19971    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19972    pub aux3: i16,
19973    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19974    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19975    pub aux4: i16,
19976    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19978    pub aux5: i16,
19979    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19981    pub aux6: i16,
19982}
19983impl MANUAL_CONTROL_DATA {
19984    pub const ENCODED_LEN: usize = 30usize;
19985    pub const DEFAULT: Self = Self {
19986        x: 0_i16,
19987        y: 0_i16,
19988        z: 0_i16,
19989        r: 0_i16,
19990        buttons: 0_u16,
19991        target: 0_u8,
19992        buttons2: 0_u16,
19993        enabled_extensions: 0_u8,
19994        s: 0_i16,
19995        t: 0_i16,
19996        aux1: 0_i16,
19997        aux2: 0_i16,
19998        aux3: 0_i16,
19999        aux4: 0_i16,
20000        aux5: 0_i16,
20001        aux6: 0_i16,
20002    };
20003    #[cfg(feature = "arbitrary")]
20004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20005        use arbitrary::{Arbitrary, Unstructured};
20006        let mut buf = [0u8; 1024];
20007        rng.fill_bytes(&mut buf);
20008        let mut unstructured = Unstructured::new(&buf);
20009        Self::arbitrary(&mut unstructured).unwrap_or_default()
20010    }
20011}
20012impl Default for MANUAL_CONTROL_DATA {
20013    fn default() -> Self {
20014        Self::DEFAULT.clone()
20015    }
20016}
20017impl MessageData for MANUAL_CONTROL_DATA {
20018    type Message = MavMessage;
20019    const ID: u32 = 69u32;
20020    const NAME: &'static str = "MANUAL_CONTROL";
20021    const EXTRA_CRC: u8 = 243u8;
20022    const ENCODED_LEN: usize = 30usize;
20023    fn deser(
20024        _version: MavlinkVersion,
20025        __input: &[u8],
20026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20027        let avail_len = __input.len();
20028        let mut payload_buf = [0; Self::ENCODED_LEN];
20029        let mut buf = if avail_len < Self::ENCODED_LEN {
20030            payload_buf[0..avail_len].copy_from_slice(__input);
20031            Bytes::new(&payload_buf)
20032        } else {
20033            Bytes::new(__input)
20034        };
20035        let mut __struct = Self::default();
20036        __struct.x = buf.get_i16_le();
20037        __struct.y = buf.get_i16_le();
20038        __struct.z = buf.get_i16_le();
20039        __struct.r = buf.get_i16_le();
20040        __struct.buttons = buf.get_u16_le();
20041        __struct.target = buf.get_u8();
20042        __struct.buttons2 = buf.get_u16_le();
20043        __struct.enabled_extensions = buf.get_u8();
20044        __struct.s = buf.get_i16_le();
20045        __struct.t = buf.get_i16_le();
20046        __struct.aux1 = buf.get_i16_le();
20047        __struct.aux2 = buf.get_i16_le();
20048        __struct.aux3 = buf.get_i16_le();
20049        __struct.aux4 = buf.get_i16_le();
20050        __struct.aux5 = buf.get_i16_le();
20051        __struct.aux6 = buf.get_i16_le();
20052        Ok(__struct)
20053    }
20054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20055        let mut __tmp = BytesMut::new(bytes);
20056        #[allow(clippy::absurd_extreme_comparisons)]
20057        #[allow(unused_comparisons)]
20058        if __tmp.remaining() < Self::ENCODED_LEN {
20059            panic!(
20060                "buffer is too small (need {} bytes, but got {})",
20061                Self::ENCODED_LEN,
20062                __tmp.remaining(),
20063            )
20064        }
20065        __tmp.put_i16_le(self.x);
20066        __tmp.put_i16_le(self.y);
20067        __tmp.put_i16_le(self.z);
20068        __tmp.put_i16_le(self.r);
20069        __tmp.put_u16_le(self.buttons);
20070        __tmp.put_u8(self.target);
20071        if matches!(version, MavlinkVersion::V2) {
20072            __tmp.put_u16_le(self.buttons2);
20073            __tmp.put_u8(self.enabled_extensions);
20074            __tmp.put_i16_le(self.s);
20075            __tmp.put_i16_le(self.t);
20076            __tmp.put_i16_le(self.aux1);
20077            __tmp.put_i16_le(self.aux2);
20078            __tmp.put_i16_le(self.aux3);
20079            __tmp.put_i16_le(self.aux4);
20080            __tmp.put_i16_le(self.aux5);
20081            __tmp.put_i16_le(self.aux6);
20082            let len = __tmp.len();
20083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20084        } else {
20085            __tmp.len()
20086        }
20087    }
20088}
20089#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
20090#[doc = ""]
20091#[doc = "ID: 81"]
20092#[derive(Debug, Clone, PartialEq)]
20093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20095#[cfg_attr(feature = "ts", derive(TS))]
20096#[cfg_attr(feature = "ts", ts(export))]
20097pub struct MANUAL_SETPOINT_DATA {
20098    #[doc = "Timestamp (time since system boot)."]
20099    pub time_boot_ms: u32,
20100    #[doc = "Desired roll rate"]
20101    pub roll: f32,
20102    #[doc = "Desired pitch rate"]
20103    pub pitch: f32,
20104    #[doc = "Desired yaw rate"]
20105    pub yaw: f32,
20106    #[doc = "Collective thrust, normalized to 0 .. 1"]
20107    pub thrust: f32,
20108    #[doc = "Flight mode switch position, 0.. 255"]
20109    pub mode_switch: u8,
20110    #[doc = "Override mode switch position, 0.. 255"]
20111    pub manual_override_switch: u8,
20112}
20113impl MANUAL_SETPOINT_DATA {
20114    pub const ENCODED_LEN: usize = 22usize;
20115    pub const DEFAULT: Self = Self {
20116        time_boot_ms: 0_u32,
20117        roll: 0.0_f32,
20118        pitch: 0.0_f32,
20119        yaw: 0.0_f32,
20120        thrust: 0.0_f32,
20121        mode_switch: 0_u8,
20122        manual_override_switch: 0_u8,
20123    };
20124    #[cfg(feature = "arbitrary")]
20125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20126        use arbitrary::{Arbitrary, Unstructured};
20127        let mut buf = [0u8; 1024];
20128        rng.fill_bytes(&mut buf);
20129        let mut unstructured = Unstructured::new(&buf);
20130        Self::arbitrary(&mut unstructured).unwrap_or_default()
20131    }
20132}
20133impl Default for MANUAL_SETPOINT_DATA {
20134    fn default() -> Self {
20135        Self::DEFAULT.clone()
20136    }
20137}
20138impl MessageData for MANUAL_SETPOINT_DATA {
20139    type Message = MavMessage;
20140    const ID: u32 = 81u32;
20141    const NAME: &'static str = "MANUAL_SETPOINT";
20142    const EXTRA_CRC: u8 = 106u8;
20143    const ENCODED_LEN: usize = 22usize;
20144    fn deser(
20145        _version: MavlinkVersion,
20146        __input: &[u8],
20147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20148        let avail_len = __input.len();
20149        let mut payload_buf = [0; Self::ENCODED_LEN];
20150        let mut buf = if avail_len < Self::ENCODED_LEN {
20151            payload_buf[0..avail_len].copy_from_slice(__input);
20152            Bytes::new(&payload_buf)
20153        } else {
20154            Bytes::new(__input)
20155        };
20156        let mut __struct = Self::default();
20157        __struct.time_boot_ms = buf.get_u32_le();
20158        __struct.roll = buf.get_f32_le();
20159        __struct.pitch = buf.get_f32_le();
20160        __struct.yaw = buf.get_f32_le();
20161        __struct.thrust = buf.get_f32_le();
20162        __struct.mode_switch = buf.get_u8();
20163        __struct.manual_override_switch = buf.get_u8();
20164        Ok(__struct)
20165    }
20166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20167        let mut __tmp = BytesMut::new(bytes);
20168        #[allow(clippy::absurd_extreme_comparisons)]
20169        #[allow(unused_comparisons)]
20170        if __tmp.remaining() < Self::ENCODED_LEN {
20171            panic!(
20172                "buffer is too small (need {} bytes, but got {})",
20173                Self::ENCODED_LEN,
20174                __tmp.remaining(),
20175            )
20176        }
20177        __tmp.put_u32_le(self.time_boot_ms);
20178        __tmp.put_f32_le(self.roll);
20179        __tmp.put_f32_le(self.pitch);
20180        __tmp.put_f32_le(self.yaw);
20181        __tmp.put_f32_le(self.thrust);
20182        __tmp.put_u8(self.mode_switch);
20183        __tmp.put_u8(self.manual_override_switch);
20184        if matches!(version, MavlinkVersion::V2) {
20185            let len = __tmp.len();
20186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20187        } else {
20188            __tmp.len()
20189        }
20190    }
20191}
20192#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20193#[doc = ""]
20194#[doc = "ID: 249"]
20195#[derive(Debug, Clone, PartialEq)]
20196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20198#[cfg_attr(feature = "ts", derive(TS))]
20199#[cfg_attr(feature = "ts", ts(export))]
20200pub struct MEMORY_VECT_DATA {
20201    #[doc = "Starting address of the debug variables"]
20202    pub address: u16,
20203    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
20204    pub ver: u8,
20205    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
20206    pub mavtype: u8,
20207    #[doc = "Memory contents at specified address"]
20208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20209    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20210    pub value: [i8; 32],
20211}
20212impl MEMORY_VECT_DATA {
20213    pub const ENCODED_LEN: usize = 36usize;
20214    pub const DEFAULT: Self = Self {
20215        address: 0_u16,
20216        ver: 0_u8,
20217        mavtype: 0_u8,
20218        value: [0_i8; 32usize],
20219    };
20220    #[cfg(feature = "arbitrary")]
20221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20222        use arbitrary::{Arbitrary, Unstructured};
20223        let mut buf = [0u8; 1024];
20224        rng.fill_bytes(&mut buf);
20225        let mut unstructured = Unstructured::new(&buf);
20226        Self::arbitrary(&mut unstructured).unwrap_or_default()
20227    }
20228}
20229impl Default for MEMORY_VECT_DATA {
20230    fn default() -> Self {
20231        Self::DEFAULT.clone()
20232    }
20233}
20234impl MessageData for MEMORY_VECT_DATA {
20235    type Message = MavMessage;
20236    const ID: u32 = 249u32;
20237    const NAME: &'static str = "MEMORY_VECT";
20238    const EXTRA_CRC: u8 = 204u8;
20239    const ENCODED_LEN: usize = 36usize;
20240    fn deser(
20241        _version: MavlinkVersion,
20242        __input: &[u8],
20243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20244        let avail_len = __input.len();
20245        let mut payload_buf = [0; Self::ENCODED_LEN];
20246        let mut buf = if avail_len < Self::ENCODED_LEN {
20247            payload_buf[0..avail_len].copy_from_slice(__input);
20248            Bytes::new(&payload_buf)
20249        } else {
20250            Bytes::new(__input)
20251        };
20252        let mut __struct = Self::default();
20253        __struct.address = buf.get_u16_le();
20254        __struct.ver = buf.get_u8();
20255        __struct.mavtype = buf.get_u8();
20256        for v in &mut __struct.value {
20257            let val = buf.get_i8();
20258            *v = val;
20259        }
20260        Ok(__struct)
20261    }
20262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20263        let mut __tmp = BytesMut::new(bytes);
20264        #[allow(clippy::absurd_extreme_comparisons)]
20265        #[allow(unused_comparisons)]
20266        if __tmp.remaining() < Self::ENCODED_LEN {
20267            panic!(
20268                "buffer is too small (need {} bytes, but got {})",
20269                Self::ENCODED_LEN,
20270                __tmp.remaining(),
20271            )
20272        }
20273        __tmp.put_u16_le(self.address);
20274        __tmp.put_u8(self.ver);
20275        __tmp.put_u8(self.mavtype);
20276        for val in &self.value {
20277            __tmp.put_i8(*val);
20278        }
20279        if matches!(version, MavlinkVersion::V2) {
20280            let len = __tmp.len();
20281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20282        } else {
20283            __tmp.len()
20284        }
20285    }
20286}
20287#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20288#[doc = ""]
20289#[doc = "ID: 244"]
20290#[derive(Debug, Clone, PartialEq)]
20291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20293#[cfg_attr(feature = "ts", derive(TS))]
20294#[cfg_attr(feature = "ts", ts(export))]
20295pub struct MESSAGE_INTERVAL_DATA {
20296    #[doc = "0 indicates the interval at which it is sent."]
20297    pub interval_us: i32,
20298    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20299    pub message_id: u16,
20300}
20301impl MESSAGE_INTERVAL_DATA {
20302    pub const ENCODED_LEN: usize = 6usize;
20303    pub const DEFAULT: Self = Self {
20304        interval_us: 0_i32,
20305        message_id: 0_u16,
20306    };
20307    #[cfg(feature = "arbitrary")]
20308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20309        use arbitrary::{Arbitrary, Unstructured};
20310        let mut buf = [0u8; 1024];
20311        rng.fill_bytes(&mut buf);
20312        let mut unstructured = Unstructured::new(&buf);
20313        Self::arbitrary(&mut unstructured).unwrap_or_default()
20314    }
20315}
20316impl Default for MESSAGE_INTERVAL_DATA {
20317    fn default() -> Self {
20318        Self::DEFAULT.clone()
20319    }
20320}
20321impl MessageData for MESSAGE_INTERVAL_DATA {
20322    type Message = MavMessage;
20323    const ID: u32 = 244u32;
20324    const NAME: &'static str = "MESSAGE_INTERVAL";
20325    const EXTRA_CRC: u8 = 95u8;
20326    const ENCODED_LEN: usize = 6usize;
20327    fn deser(
20328        _version: MavlinkVersion,
20329        __input: &[u8],
20330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20331        let avail_len = __input.len();
20332        let mut payload_buf = [0; Self::ENCODED_LEN];
20333        let mut buf = if avail_len < Self::ENCODED_LEN {
20334            payload_buf[0..avail_len].copy_from_slice(__input);
20335            Bytes::new(&payload_buf)
20336        } else {
20337            Bytes::new(__input)
20338        };
20339        let mut __struct = Self::default();
20340        __struct.interval_us = buf.get_i32_le();
20341        __struct.message_id = buf.get_u16_le();
20342        Ok(__struct)
20343    }
20344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20345        let mut __tmp = BytesMut::new(bytes);
20346        #[allow(clippy::absurd_extreme_comparisons)]
20347        #[allow(unused_comparisons)]
20348        if __tmp.remaining() < Self::ENCODED_LEN {
20349            panic!(
20350                "buffer is too small (need {} bytes, but got {})",
20351                Self::ENCODED_LEN,
20352                __tmp.remaining(),
20353            )
20354        }
20355        __tmp.put_i32_le(self.interval_us);
20356        __tmp.put_u16_le(self.message_id);
20357        if matches!(version, MavlinkVersion::V2) {
20358            let len = __tmp.len();
20359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20360        } else {
20361            __tmp.len()
20362        }
20363    }
20364}
20365#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20366#[doc = ""]
20367#[doc = "ID: 47"]
20368#[derive(Debug, Clone, PartialEq)]
20369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20371#[cfg_attr(feature = "ts", derive(TS))]
20372#[cfg_attr(feature = "ts", ts(export))]
20373pub struct MISSION_ACK_DATA {
20374    #[doc = "System ID"]
20375    pub target_system: u8,
20376    #[doc = "Component ID"]
20377    pub target_component: u8,
20378    #[doc = "Mission result."]
20379    pub mavtype: MavMissionResult,
20380    #[doc = "Mission type."]
20381    #[cfg_attr(feature = "serde", serde(default))]
20382    pub mission_type: MavMissionType,
20383    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20384    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20385    pub opaque_id: u32,
20386}
20387impl MISSION_ACK_DATA {
20388    pub const ENCODED_LEN: usize = 8usize;
20389    pub const DEFAULT: Self = Self {
20390        target_system: 0_u8,
20391        target_component: 0_u8,
20392        mavtype: MavMissionResult::DEFAULT,
20393        mission_type: MavMissionType::DEFAULT,
20394        opaque_id: 0_u32,
20395    };
20396    #[cfg(feature = "arbitrary")]
20397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20398        use arbitrary::{Arbitrary, Unstructured};
20399        let mut buf = [0u8; 1024];
20400        rng.fill_bytes(&mut buf);
20401        let mut unstructured = Unstructured::new(&buf);
20402        Self::arbitrary(&mut unstructured).unwrap_or_default()
20403    }
20404}
20405impl Default for MISSION_ACK_DATA {
20406    fn default() -> Self {
20407        Self::DEFAULT.clone()
20408    }
20409}
20410impl MessageData for MISSION_ACK_DATA {
20411    type Message = MavMessage;
20412    const ID: u32 = 47u32;
20413    const NAME: &'static str = "MISSION_ACK";
20414    const EXTRA_CRC: u8 = 153u8;
20415    const ENCODED_LEN: usize = 8usize;
20416    fn deser(
20417        _version: MavlinkVersion,
20418        __input: &[u8],
20419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20420        let avail_len = __input.len();
20421        let mut payload_buf = [0; Self::ENCODED_LEN];
20422        let mut buf = if avail_len < Self::ENCODED_LEN {
20423            payload_buf[0..avail_len].copy_from_slice(__input);
20424            Bytes::new(&payload_buf)
20425        } else {
20426            Bytes::new(__input)
20427        };
20428        let mut __struct = Self::default();
20429        __struct.target_system = buf.get_u8();
20430        __struct.target_component = buf.get_u8();
20431        let tmp = buf.get_u8();
20432        __struct.mavtype =
20433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20434                enum_type: "MavMissionResult",
20435                value: tmp as u64,
20436            })?;
20437        let tmp = buf.get_u8();
20438        __struct.mission_type =
20439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20440                enum_type: "MavMissionType",
20441                value: tmp as u64,
20442            })?;
20443        __struct.opaque_id = buf.get_u32_le();
20444        Ok(__struct)
20445    }
20446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20447        let mut __tmp = BytesMut::new(bytes);
20448        #[allow(clippy::absurd_extreme_comparisons)]
20449        #[allow(unused_comparisons)]
20450        if __tmp.remaining() < Self::ENCODED_LEN {
20451            panic!(
20452                "buffer is too small (need {} bytes, but got {})",
20453                Self::ENCODED_LEN,
20454                __tmp.remaining(),
20455            )
20456        }
20457        __tmp.put_u8(self.target_system);
20458        __tmp.put_u8(self.target_component);
20459        __tmp.put_u8(self.mavtype as u8);
20460        if matches!(version, MavlinkVersion::V2) {
20461            __tmp.put_u8(self.mission_type as u8);
20462            __tmp.put_u32_le(self.opaque_id);
20463            let len = __tmp.len();
20464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20465        } else {
20466            __tmp.len()
20467        }
20468    }
20469}
20470#[doc = "Delete all mission items at once."]
20471#[doc = ""]
20472#[doc = "ID: 45"]
20473#[derive(Debug, Clone, PartialEq)]
20474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20476#[cfg_attr(feature = "ts", derive(TS))]
20477#[cfg_attr(feature = "ts", ts(export))]
20478pub struct MISSION_CLEAR_ALL_DATA {
20479    #[doc = "System ID"]
20480    pub target_system: u8,
20481    #[doc = "Component ID"]
20482    pub target_component: u8,
20483    #[doc = "Mission type."]
20484    #[cfg_attr(feature = "serde", serde(default))]
20485    pub mission_type: MavMissionType,
20486}
20487impl MISSION_CLEAR_ALL_DATA {
20488    pub const ENCODED_LEN: usize = 3usize;
20489    pub const DEFAULT: Self = Self {
20490        target_system: 0_u8,
20491        target_component: 0_u8,
20492        mission_type: MavMissionType::DEFAULT,
20493    };
20494    #[cfg(feature = "arbitrary")]
20495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20496        use arbitrary::{Arbitrary, Unstructured};
20497        let mut buf = [0u8; 1024];
20498        rng.fill_bytes(&mut buf);
20499        let mut unstructured = Unstructured::new(&buf);
20500        Self::arbitrary(&mut unstructured).unwrap_or_default()
20501    }
20502}
20503impl Default for MISSION_CLEAR_ALL_DATA {
20504    fn default() -> Self {
20505        Self::DEFAULT.clone()
20506    }
20507}
20508impl MessageData for MISSION_CLEAR_ALL_DATA {
20509    type Message = MavMessage;
20510    const ID: u32 = 45u32;
20511    const NAME: &'static str = "MISSION_CLEAR_ALL";
20512    const EXTRA_CRC: u8 = 232u8;
20513    const ENCODED_LEN: usize = 3usize;
20514    fn deser(
20515        _version: MavlinkVersion,
20516        __input: &[u8],
20517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20518        let avail_len = __input.len();
20519        let mut payload_buf = [0; Self::ENCODED_LEN];
20520        let mut buf = if avail_len < Self::ENCODED_LEN {
20521            payload_buf[0..avail_len].copy_from_slice(__input);
20522            Bytes::new(&payload_buf)
20523        } else {
20524            Bytes::new(__input)
20525        };
20526        let mut __struct = Self::default();
20527        __struct.target_system = buf.get_u8();
20528        __struct.target_component = buf.get_u8();
20529        let tmp = buf.get_u8();
20530        __struct.mission_type =
20531            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20532                enum_type: "MavMissionType",
20533                value: tmp as u64,
20534            })?;
20535        Ok(__struct)
20536    }
20537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20538        let mut __tmp = BytesMut::new(bytes);
20539        #[allow(clippy::absurd_extreme_comparisons)]
20540        #[allow(unused_comparisons)]
20541        if __tmp.remaining() < Self::ENCODED_LEN {
20542            panic!(
20543                "buffer is too small (need {} bytes, but got {})",
20544                Self::ENCODED_LEN,
20545                __tmp.remaining(),
20546            )
20547        }
20548        __tmp.put_u8(self.target_system);
20549        __tmp.put_u8(self.target_component);
20550        if matches!(version, MavlinkVersion::V2) {
20551            __tmp.put_u8(self.mission_type as u8);
20552            let len = __tmp.len();
20553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20554        } else {
20555            __tmp.len()
20556        }
20557    }
20558}
20559#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20560#[doc = ""]
20561#[doc = "ID: 44"]
20562#[derive(Debug, Clone, PartialEq)]
20563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20565#[cfg_attr(feature = "ts", derive(TS))]
20566#[cfg_attr(feature = "ts", ts(export))]
20567pub struct MISSION_COUNT_DATA {
20568    #[doc = "Number of mission items in the sequence"]
20569    pub count: u16,
20570    #[doc = "System ID"]
20571    pub target_system: u8,
20572    #[doc = "Component ID"]
20573    pub target_component: u8,
20574    #[doc = "Mission type."]
20575    #[cfg_attr(feature = "serde", serde(default))]
20576    pub mission_type: MavMissionType,
20577    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20578    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20579    pub opaque_id: u32,
20580}
20581impl MISSION_COUNT_DATA {
20582    pub const ENCODED_LEN: usize = 9usize;
20583    pub const DEFAULT: Self = Self {
20584        count: 0_u16,
20585        target_system: 0_u8,
20586        target_component: 0_u8,
20587        mission_type: MavMissionType::DEFAULT,
20588        opaque_id: 0_u32,
20589    };
20590    #[cfg(feature = "arbitrary")]
20591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20592        use arbitrary::{Arbitrary, Unstructured};
20593        let mut buf = [0u8; 1024];
20594        rng.fill_bytes(&mut buf);
20595        let mut unstructured = Unstructured::new(&buf);
20596        Self::arbitrary(&mut unstructured).unwrap_or_default()
20597    }
20598}
20599impl Default for MISSION_COUNT_DATA {
20600    fn default() -> Self {
20601        Self::DEFAULT.clone()
20602    }
20603}
20604impl MessageData for MISSION_COUNT_DATA {
20605    type Message = MavMessage;
20606    const ID: u32 = 44u32;
20607    const NAME: &'static str = "MISSION_COUNT";
20608    const EXTRA_CRC: u8 = 221u8;
20609    const ENCODED_LEN: usize = 9usize;
20610    fn deser(
20611        _version: MavlinkVersion,
20612        __input: &[u8],
20613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20614        let avail_len = __input.len();
20615        let mut payload_buf = [0; Self::ENCODED_LEN];
20616        let mut buf = if avail_len < Self::ENCODED_LEN {
20617            payload_buf[0..avail_len].copy_from_slice(__input);
20618            Bytes::new(&payload_buf)
20619        } else {
20620            Bytes::new(__input)
20621        };
20622        let mut __struct = Self::default();
20623        __struct.count = buf.get_u16_le();
20624        __struct.target_system = buf.get_u8();
20625        __struct.target_component = buf.get_u8();
20626        let tmp = buf.get_u8();
20627        __struct.mission_type =
20628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20629                enum_type: "MavMissionType",
20630                value: tmp as u64,
20631            })?;
20632        __struct.opaque_id = buf.get_u32_le();
20633        Ok(__struct)
20634    }
20635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20636        let mut __tmp = BytesMut::new(bytes);
20637        #[allow(clippy::absurd_extreme_comparisons)]
20638        #[allow(unused_comparisons)]
20639        if __tmp.remaining() < Self::ENCODED_LEN {
20640            panic!(
20641                "buffer is too small (need {} bytes, but got {})",
20642                Self::ENCODED_LEN,
20643                __tmp.remaining(),
20644            )
20645        }
20646        __tmp.put_u16_le(self.count);
20647        __tmp.put_u8(self.target_system);
20648        __tmp.put_u8(self.target_component);
20649        if matches!(version, MavlinkVersion::V2) {
20650            __tmp.put_u8(self.mission_type as u8);
20651            __tmp.put_u32_le(self.opaque_id);
20652            let len = __tmp.len();
20653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20654        } else {
20655            __tmp.len()
20656        }
20657    }
20658}
20659#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20660#[doc = ""]
20661#[doc = "ID: 42"]
20662#[derive(Debug, Clone, PartialEq)]
20663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20665#[cfg_attr(feature = "ts", derive(TS))]
20666#[cfg_attr(feature = "ts", ts(export))]
20667pub struct MISSION_CURRENT_DATA {
20668    #[doc = "Sequence"]
20669    pub seq: u16,
20670    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20672    pub total: u16,
20673    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20674    #[cfg_attr(feature = "serde", serde(default))]
20675    pub mission_state: MissionState,
20676    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20677    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20678    pub mission_mode: u8,
20679    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20681    pub mission_id: u32,
20682    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20684    pub fence_id: u32,
20685    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20687    pub rally_points_id: u32,
20688}
20689impl MISSION_CURRENT_DATA {
20690    pub const ENCODED_LEN: usize = 18usize;
20691    pub const DEFAULT: Self = Self {
20692        seq: 0_u16,
20693        total: 0_u16,
20694        mission_state: MissionState::DEFAULT,
20695        mission_mode: 0_u8,
20696        mission_id: 0_u32,
20697        fence_id: 0_u32,
20698        rally_points_id: 0_u32,
20699    };
20700    #[cfg(feature = "arbitrary")]
20701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20702        use arbitrary::{Arbitrary, Unstructured};
20703        let mut buf = [0u8; 1024];
20704        rng.fill_bytes(&mut buf);
20705        let mut unstructured = Unstructured::new(&buf);
20706        Self::arbitrary(&mut unstructured).unwrap_or_default()
20707    }
20708}
20709impl Default for MISSION_CURRENT_DATA {
20710    fn default() -> Self {
20711        Self::DEFAULT.clone()
20712    }
20713}
20714impl MessageData for MISSION_CURRENT_DATA {
20715    type Message = MavMessage;
20716    const ID: u32 = 42u32;
20717    const NAME: &'static str = "MISSION_CURRENT";
20718    const EXTRA_CRC: u8 = 28u8;
20719    const ENCODED_LEN: usize = 18usize;
20720    fn deser(
20721        _version: MavlinkVersion,
20722        __input: &[u8],
20723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20724        let avail_len = __input.len();
20725        let mut payload_buf = [0; Self::ENCODED_LEN];
20726        let mut buf = if avail_len < Self::ENCODED_LEN {
20727            payload_buf[0..avail_len].copy_from_slice(__input);
20728            Bytes::new(&payload_buf)
20729        } else {
20730            Bytes::new(__input)
20731        };
20732        let mut __struct = Self::default();
20733        __struct.seq = buf.get_u16_le();
20734        __struct.total = buf.get_u16_le();
20735        let tmp = buf.get_u8();
20736        __struct.mission_state =
20737            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20738                enum_type: "MissionState",
20739                value: tmp as u64,
20740            })?;
20741        __struct.mission_mode = buf.get_u8();
20742        __struct.mission_id = buf.get_u32_le();
20743        __struct.fence_id = buf.get_u32_le();
20744        __struct.rally_points_id = buf.get_u32_le();
20745        Ok(__struct)
20746    }
20747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20748        let mut __tmp = BytesMut::new(bytes);
20749        #[allow(clippy::absurd_extreme_comparisons)]
20750        #[allow(unused_comparisons)]
20751        if __tmp.remaining() < Self::ENCODED_LEN {
20752            panic!(
20753                "buffer is too small (need {} bytes, but got {})",
20754                Self::ENCODED_LEN,
20755                __tmp.remaining(),
20756            )
20757        }
20758        __tmp.put_u16_le(self.seq);
20759        if matches!(version, MavlinkVersion::V2) {
20760            __tmp.put_u16_le(self.total);
20761            __tmp.put_u8(self.mission_state as u8);
20762            __tmp.put_u8(self.mission_mode);
20763            __tmp.put_u32_le(self.mission_id);
20764            __tmp.put_u32_le(self.fence_id);
20765            __tmp.put_u32_le(self.rally_points_id);
20766            let len = __tmp.len();
20767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20768        } else {
20769            __tmp.len()
20770        }
20771    }
20772}
20773#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20774#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20775#[doc = ""]
20776#[doc = "ID: 39"]
20777#[derive(Debug, Clone, PartialEq)]
20778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20780#[cfg_attr(feature = "ts", derive(TS))]
20781#[cfg_attr(feature = "ts", ts(export))]
20782pub struct MISSION_ITEM_DATA {
20783    #[doc = "PARAM1, see MAV_CMD enum"]
20784    pub param1: f32,
20785    #[doc = "PARAM2, see MAV_CMD enum"]
20786    pub param2: f32,
20787    #[doc = "PARAM3, see MAV_CMD enum"]
20788    pub param3: f32,
20789    #[doc = "PARAM4, see MAV_CMD enum"]
20790    pub param4: f32,
20791    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20792    pub x: f32,
20793    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20794    pub y: f32,
20795    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20796    pub z: f32,
20797    #[doc = "Sequence"]
20798    pub seq: u16,
20799    #[doc = "The scheduled action for the waypoint."]
20800    pub command: MavCmd,
20801    #[doc = "System ID"]
20802    pub target_system: u8,
20803    #[doc = "Component ID"]
20804    pub target_component: u8,
20805    #[doc = "The coordinate system of the waypoint."]
20806    pub frame: MavFrame,
20807    #[doc = "false:0, true:1"]
20808    pub current: u8,
20809    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20810    pub autocontinue: u8,
20811    #[doc = "Mission type."]
20812    #[cfg_attr(feature = "serde", serde(default))]
20813    pub mission_type: MavMissionType,
20814}
20815impl MISSION_ITEM_DATA {
20816    pub const ENCODED_LEN: usize = 38usize;
20817    pub const DEFAULT: Self = Self {
20818        param1: 0.0_f32,
20819        param2: 0.0_f32,
20820        param3: 0.0_f32,
20821        param4: 0.0_f32,
20822        x: 0.0_f32,
20823        y: 0.0_f32,
20824        z: 0.0_f32,
20825        seq: 0_u16,
20826        command: MavCmd::DEFAULT,
20827        target_system: 0_u8,
20828        target_component: 0_u8,
20829        frame: MavFrame::DEFAULT,
20830        current: 0_u8,
20831        autocontinue: 0_u8,
20832        mission_type: MavMissionType::DEFAULT,
20833    };
20834    #[cfg(feature = "arbitrary")]
20835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20836        use arbitrary::{Arbitrary, Unstructured};
20837        let mut buf = [0u8; 1024];
20838        rng.fill_bytes(&mut buf);
20839        let mut unstructured = Unstructured::new(&buf);
20840        Self::arbitrary(&mut unstructured).unwrap_or_default()
20841    }
20842}
20843impl Default for MISSION_ITEM_DATA {
20844    fn default() -> Self {
20845        Self::DEFAULT.clone()
20846    }
20847}
20848impl MessageData for MISSION_ITEM_DATA {
20849    type Message = MavMessage;
20850    const ID: u32 = 39u32;
20851    const NAME: &'static str = "MISSION_ITEM";
20852    const EXTRA_CRC: u8 = 254u8;
20853    const ENCODED_LEN: usize = 38usize;
20854    fn deser(
20855        _version: MavlinkVersion,
20856        __input: &[u8],
20857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20858        let avail_len = __input.len();
20859        let mut payload_buf = [0; Self::ENCODED_LEN];
20860        let mut buf = if avail_len < Self::ENCODED_LEN {
20861            payload_buf[0..avail_len].copy_from_slice(__input);
20862            Bytes::new(&payload_buf)
20863        } else {
20864            Bytes::new(__input)
20865        };
20866        let mut __struct = Self::default();
20867        __struct.param1 = buf.get_f32_le();
20868        __struct.param2 = buf.get_f32_le();
20869        __struct.param3 = buf.get_f32_le();
20870        __struct.param4 = buf.get_f32_le();
20871        __struct.x = buf.get_f32_le();
20872        __struct.y = buf.get_f32_le();
20873        __struct.z = buf.get_f32_le();
20874        __struct.seq = buf.get_u16_le();
20875        let tmp = buf.get_u16_le();
20876        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20877            ::mavlink_core::error::ParserError::InvalidEnum {
20878                enum_type: "MavCmd",
20879                value: tmp as u64,
20880            },
20881        )?;
20882        __struct.target_system = buf.get_u8();
20883        __struct.target_component = buf.get_u8();
20884        let tmp = buf.get_u8();
20885        __struct.frame =
20886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20887                enum_type: "MavFrame",
20888                value: tmp as u64,
20889            })?;
20890        __struct.current = buf.get_u8();
20891        __struct.autocontinue = buf.get_u8();
20892        let tmp = buf.get_u8();
20893        __struct.mission_type =
20894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20895                enum_type: "MavMissionType",
20896                value: tmp as u64,
20897            })?;
20898        Ok(__struct)
20899    }
20900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20901        let mut __tmp = BytesMut::new(bytes);
20902        #[allow(clippy::absurd_extreme_comparisons)]
20903        #[allow(unused_comparisons)]
20904        if __tmp.remaining() < Self::ENCODED_LEN {
20905            panic!(
20906                "buffer is too small (need {} bytes, but got {})",
20907                Self::ENCODED_LEN,
20908                __tmp.remaining(),
20909            )
20910        }
20911        __tmp.put_f32_le(self.param1);
20912        __tmp.put_f32_le(self.param2);
20913        __tmp.put_f32_le(self.param3);
20914        __tmp.put_f32_le(self.param4);
20915        __tmp.put_f32_le(self.x);
20916        __tmp.put_f32_le(self.y);
20917        __tmp.put_f32_le(self.z);
20918        __tmp.put_u16_le(self.seq);
20919        __tmp.put_u16_le(self.command as u16);
20920        __tmp.put_u8(self.target_system);
20921        __tmp.put_u8(self.target_component);
20922        __tmp.put_u8(self.frame as u8);
20923        __tmp.put_u8(self.current);
20924        __tmp.put_u8(self.autocontinue);
20925        if matches!(version, MavlinkVersion::V2) {
20926            __tmp.put_u8(self.mission_type as u8);
20927            let len = __tmp.len();
20928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20929        } else {
20930            __tmp.len()
20931        }
20932    }
20933}
20934#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20935#[doc = ""]
20936#[doc = "ID: 73"]
20937#[derive(Debug, Clone, PartialEq)]
20938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20940#[cfg_attr(feature = "ts", derive(TS))]
20941#[cfg_attr(feature = "ts", ts(export))]
20942pub struct MISSION_ITEM_INT_DATA {
20943    #[doc = "PARAM1, see MAV_CMD enum"]
20944    pub param1: f32,
20945    #[doc = "PARAM2, see MAV_CMD enum"]
20946    pub param2: f32,
20947    #[doc = "PARAM3, see MAV_CMD enum"]
20948    pub param3: f32,
20949    #[doc = "PARAM4, see MAV_CMD enum"]
20950    pub param4: f32,
20951    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20952    pub x: i32,
20953    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20954    pub y: i32,
20955    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20956    pub z: f32,
20957    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20958    pub seq: u16,
20959    #[doc = "The scheduled action for the waypoint."]
20960    pub command: MavCmd,
20961    #[doc = "System ID"]
20962    pub target_system: u8,
20963    #[doc = "Component ID"]
20964    pub target_component: u8,
20965    #[doc = "The coordinate system of the waypoint."]
20966    pub frame: MavFrame,
20967    #[doc = "false:0, true:1"]
20968    pub current: u8,
20969    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20970    pub autocontinue: u8,
20971    #[doc = "Mission type."]
20972    #[cfg_attr(feature = "serde", serde(default))]
20973    pub mission_type: MavMissionType,
20974}
20975impl MISSION_ITEM_INT_DATA {
20976    pub const ENCODED_LEN: usize = 38usize;
20977    pub const DEFAULT: Self = Self {
20978        param1: 0.0_f32,
20979        param2: 0.0_f32,
20980        param3: 0.0_f32,
20981        param4: 0.0_f32,
20982        x: 0_i32,
20983        y: 0_i32,
20984        z: 0.0_f32,
20985        seq: 0_u16,
20986        command: MavCmd::DEFAULT,
20987        target_system: 0_u8,
20988        target_component: 0_u8,
20989        frame: MavFrame::DEFAULT,
20990        current: 0_u8,
20991        autocontinue: 0_u8,
20992        mission_type: MavMissionType::DEFAULT,
20993    };
20994    #[cfg(feature = "arbitrary")]
20995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20996        use arbitrary::{Arbitrary, Unstructured};
20997        let mut buf = [0u8; 1024];
20998        rng.fill_bytes(&mut buf);
20999        let mut unstructured = Unstructured::new(&buf);
21000        Self::arbitrary(&mut unstructured).unwrap_or_default()
21001    }
21002}
21003impl Default for MISSION_ITEM_INT_DATA {
21004    fn default() -> Self {
21005        Self::DEFAULT.clone()
21006    }
21007}
21008impl MessageData for MISSION_ITEM_INT_DATA {
21009    type Message = MavMessage;
21010    const ID: u32 = 73u32;
21011    const NAME: &'static str = "MISSION_ITEM_INT";
21012    const EXTRA_CRC: u8 = 38u8;
21013    const ENCODED_LEN: usize = 38usize;
21014    fn deser(
21015        _version: MavlinkVersion,
21016        __input: &[u8],
21017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21018        let avail_len = __input.len();
21019        let mut payload_buf = [0; Self::ENCODED_LEN];
21020        let mut buf = if avail_len < Self::ENCODED_LEN {
21021            payload_buf[0..avail_len].copy_from_slice(__input);
21022            Bytes::new(&payload_buf)
21023        } else {
21024            Bytes::new(__input)
21025        };
21026        let mut __struct = Self::default();
21027        __struct.param1 = buf.get_f32_le();
21028        __struct.param2 = buf.get_f32_le();
21029        __struct.param3 = buf.get_f32_le();
21030        __struct.param4 = buf.get_f32_le();
21031        __struct.x = buf.get_i32_le();
21032        __struct.y = buf.get_i32_le();
21033        __struct.z = buf.get_f32_le();
21034        __struct.seq = buf.get_u16_le();
21035        let tmp = buf.get_u16_le();
21036        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21037            ::mavlink_core::error::ParserError::InvalidEnum {
21038                enum_type: "MavCmd",
21039                value: tmp as u64,
21040            },
21041        )?;
21042        __struct.target_system = buf.get_u8();
21043        __struct.target_component = buf.get_u8();
21044        let tmp = buf.get_u8();
21045        __struct.frame =
21046            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21047                enum_type: "MavFrame",
21048                value: tmp as u64,
21049            })?;
21050        __struct.current = buf.get_u8();
21051        __struct.autocontinue = buf.get_u8();
21052        let tmp = buf.get_u8();
21053        __struct.mission_type =
21054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21055                enum_type: "MavMissionType",
21056                value: tmp as u64,
21057            })?;
21058        Ok(__struct)
21059    }
21060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21061        let mut __tmp = BytesMut::new(bytes);
21062        #[allow(clippy::absurd_extreme_comparisons)]
21063        #[allow(unused_comparisons)]
21064        if __tmp.remaining() < Self::ENCODED_LEN {
21065            panic!(
21066                "buffer is too small (need {} bytes, but got {})",
21067                Self::ENCODED_LEN,
21068                __tmp.remaining(),
21069            )
21070        }
21071        __tmp.put_f32_le(self.param1);
21072        __tmp.put_f32_le(self.param2);
21073        __tmp.put_f32_le(self.param3);
21074        __tmp.put_f32_le(self.param4);
21075        __tmp.put_i32_le(self.x);
21076        __tmp.put_i32_le(self.y);
21077        __tmp.put_f32_le(self.z);
21078        __tmp.put_u16_le(self.seq);
21079        __tmp.put_u16_le(self.command as u16);
21080        __tmp.put_u8(self.target_system);
21081        __tmp.put_u8(self.target_component);
21082        __tmp.put_u8(self.frame as u8);
21083        __tmp.put_u8(self.current);
21084        __tmp.put_u8(self.autocontinue);
21085        if matches!(version, MavlinkVersion::V2) {
21086            __tmp.put_u8(self.mission_type as u8);
21087            let len = __tmp.len();
21088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21089        } else {
21090            __tmp.len()
21091        }
21092    }
21093}
21094#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
21095#[doc = ""]
21096#[doc = "ID: 46"]
21097#[derive(Debug, Clone, PartialEq)]
21098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21100#[cfg_attr(feature = "ts", derive(TS))]
21101#[cfg_attr(feature = "ts", ts(export))]
21102pub struct MISSION_ITEM_REACHED_DATA {
21103    #[doc = "Sequence"]
21104    pub seq: u16,
21105}
21106impl MISSION_ITEM_REACHED_DATA {
21107    pub const ENCODED_LEN: usize = 2usize;
21108    pub const DEFAULT: Self = Self { seq: 0_u16 };
21109    #[cfg(feature = "arbitrary")]
21110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21111        use arbitrary::{Arbitrary, Unstructured};
21112        let mut buf = [0u8; 1024];
21113        rng.fill_bytes(&mut buf);
21114        let mut unstructured = Unstructured::new(&buf);
21115        Self::arbitrary(&mut unstructured).unwrap_or_default()
21116    }
21117}
21118impl Default for MISSION_ITEM_REACHED_DATA {
21119    fn default() -> Self {
21120        Self::DEFAULT.clone()
21121    }
21122}
21123impl MessageData for MISSION_ITEM_REACHED_DATA {
21124    type Message = MavMessage;
21125    const ID: u32 = 46u32;
21126    const NAME: &'static str = "MISSION_ITEM_REACHED";
21127    const EXTRA_CRC: u8 = 11u8;
21128    const ENCODED_LEN: usize = 2usize;
21129    fn deser(
21130        _version: MavlinkVersion,
21131        __input: &[u8],
21132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21133        let avail_len = __input.len();
21134        let mut payload_buf = [0; Self::ENCODED_LEN];
21135        let mut buf = if avail_len < Self::ENCODED_LEN {
21136            payload_buf[0..avail_len].copy_from_slice(__input);
21137            Bytes::new(&payload_buf)
21138        } else {
21139            Bytes::new(__input)
21140        };
21141        let mut __struct = Self::default();
21142        __struct.seq = buf.get_u16_le();
21143        Ok(__struct)
21144    }
21145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21146        let mut __tmp = BytesMut::new(bytes);
21147        #[allow(clippy::absurd_extreme_comparisons)]
21148        #[allow(unused_comparisons)]
21149        if __tmp.remaining() < Self::ENCODED_LEN {
21150            panic!(
21151                "buffer is too small (need {} bytes, but got {})",
21152                Self::ENCODED_LEN,
21153                __tmp.remaining(),
21154            )
21155        }
21156        __tmp.put_u16_le(self.seq);
21157        if matches!(version, MavlinkVersion::V2) {
21158            let len = __tmp.len();
21159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21160        } else {
21161            __tmp.len()
21162        }
21163    }
21164}
21165#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
21166#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
21167#[doc = ""]
21168#[doc = "ID: 40"]
21169#[derive(Debug, Clone, PartialEq)]
21170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21172#[cfg_attr(feature = "ts", derive(TS))]
21173#[cfg_attr(feature = "ts", ts(export))]
21174pub struct MISSION_REQUEST_DATA {
21175    #[doc = "Sequence"]
21176    pub seq: u16,
21177    #[doc = "System ID"]
21178    pub target_system: u8,
21179    #[doc = "Component ID"]
21180    pub target_component: u8,
21181    #[doc = "Mission type."]
21182    #[cfg_attr(feature = "serde", serde(default))]
21183    pub mission_type: MavMissionType,
21184}
21185impl MISSION_REQUEST_DATA {
21186    pub const ENCODED_LEN: usize = 5usize;
21187    pub const DEFAULT: Self = Self {
21188        seq: 0_u16,
21189        target_system: 0_u8,
21190        target_component: 0_u8,
21191        mission_type: MavMissionType::DEFAULT,
21192    };
21193    #[cfg(feature = "arbitrary")]
21194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21195        use arbitrary::{Arbitrary, Unstructured};
21196        let mut buf = [0u8; 1024];
21197        rng.fill_bytes(&mut buf);
21198        let mut unstructured = Unstructured::new(&buf);
21199        Self::arbitrary(&mut unstructured).unwrap_or_default()
21200    }
21201}
21202impl Default for MISSION_REQUEST_DATA {
21203    fn default() -> Self {
21204        Self::DEFAULT.clone()
21205    }
21206}
21207impl MessageData for MISSION_REQUEST_DATA {
21208    type Message = MavMessage;
21209    const ID: u32 = 40u32;
21210    const NAME: &'static str = "MISSION_REQUEST";
21211    const EXTRA_CRC: u8 = 230u8;
21212    const ENCODED_LEN: usize = 5usize;
21213    fn deser(
21214        _version: MavlinkVersion,
21215        __input: &[u8],
21216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21217        let avail_len = __input.len();
21218        let mut payload_buf = [0; Self::ENCODED_LEN];
21219        let mut buf = if avail_len < Self::ENCODED_LEN {
21220            payload_buf[0..avail_len].copy_from_slice(__input);
21221            Bytes::new(&payload_buf)
21222        } else {
21223            Bytes::new(__input)
21224        };
21225        let mut __struct = Self::default();
21226        __struct.seq = buf.get_u16_le();
21227        __struct.target_system = buf.get_u8();
21228        __struct.target_component = buf.get_u8();
21229        let tmp = buf.get_u8();
21230        __struct.mission_type =
21231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21232                enum_type: "MavMissionType",
21233                value: tmp as u64,
21234            })?;
21235        Ok(__struct)
21236    }
21237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21238        let mut __tmp = BytesMut::new(bytes);
21239        #[allow(clippy::absurd_extreme_comparisons)]
21240        #[allow(unused_comparisons)]
21241        if __tmp.remaining() < Self::ENCODED_LEN {
21242            panic!(
21243                "buffer is too small (need {} bytes, but got {})",
21244                Self::ENCODED_LEN,
21245                __tmp.remaining(),
21246            )
21247        }
21248        __tmp.put_u16_le(self.seq);
21249        __tmp.put_u8(self.target_system);
21250        __tmp.put_u8(self.target_component);
21251        if matches!(version, MavlinkVersion::V2) {
21252            __tmp.put_u8(self.mission_type as u8);
21253            let len = __tmp.len();
21254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21255        } else {
21256            __tmp.len()
21257        }
21258    }
21259}
21260#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
21261#[doc = ""]
21262#[doc = "ID: 51"]
21263#[derive(Debug, Clone, PartialEq)]
21264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21266#[cfg_attr(feature = "ts", derive(TS))]
21267#[cfg_attr(feature = "ts", ts(export))]
21268pub struct MISSION_REQUEST_INT_DATA {
21269    #[doc = "Sequence"]
21270    pub seq: u16,
21271    #[doc = "System ID"]
21272    pub target_system: u8,
21273    #[doc = "Component ID"]
21274    pub target_component: u8,
21275    #[doc = "Mission type."]
21276    #[cfg_attr(feature = "serde", serde(default))]
21277    pub mission_type: MavMissionType,
21278}
21279impl MISSION_REQUEST_INT_DATA {
21280    pub const ENCODED_LEN: usize = 5usize;
21281    pub const DEFAULT: Self = Self {
21282        seq: 0_u16,
21283        target_system: 0_u8,
21284        target_component: 0_u8,
21285        mission_type: MavMissionType::DEFAULT,
21286    };
21287    #[cfg(feature = "arbitrary")]
21288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21289        use arbitrary::{Arbitrary, Unstructured};
21290        let mut buf = [0u8; 1024];
21291        rng.fill_bytes(&mut buf);
21292        let mut unstructured = Unstructured::new(&buf);
21293        Self::arbitrary(&mut unstructured).unwrap_or_default()
21294    }
21295}
21296impl Default for MISSION_REQUEST_INT_DATA {
21297    fn default() -> Self {
21298        Self::DEFAULT.clone()
21299    }
21300}
21301impl MessageData for MISSION_REQUEST_INT_DATA {
21302    type Message = MavMessage;
21303    const ID: u32 = 51u32;
21304    const NAME: &'static str = "MISSION_REQUEST_INT";
21305    const EXTRA_CRC: u8 = 196u8;
21306    const ENCODED_LEN: usize = 5usize;
21307    fn deser(
21308        _version: MavlinkVersion,
21309        __input: &[u8],
21310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21311        let avail_len = __input.len();
21312        let mut payload_buf = [0; Self::ENCODED_LEN];
21313        let mut buf = if avail_len < Self::ENCODED_LEN {
21314            payload_buf[0..avail_len].copy_from_slice(__input);
21315            Bytes::new(&payload_buf)
21316        } else {
21317            Bytes::new(__input)
21318        };
21319        let mut __struct = Self::default();
21320        __struct.seq = buf.get_u16_le();
21321        __struct.target_system = buf.get_u8();
21322        __struct.target_component = buf.get_u8();
21323        let tmp = buf.get_u8();
21324        __struct.mission_type =
21325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21326                enum_type: "MavMissionType",
21327                value: tmp as u64,
21328            })?;
21329        Ok(__struct)
21330    }
21331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21332        let mut __tmp = BytesMut::new(bytes);
21333        #[allow(clippy::absurd_extreme_comparisons)]
21334        #[allow(unused_comparisons)]
21335        if __tmp.remaining() < Self::ENCODED_LEN {
21336            panic!(
21337                "buffer is too small (need {} bytes, but got {})",
21338                Self::ENCODED_LEN,
21339                __tmp.remaining(),
21340            )
21341        }
21342        __tmp.put_u16_le(self.seq);
21343        __tmp.put_u8(self.target_system);
21344        __tmp.put_u8(self.target_component);
21345        if matches!(version, MavlinkVersion::V2) {
21346            __tmp.put_u8(self.mission_type as u8);
21347            let len = __tmp.len();
21348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21349        } else {
21350            __tmp.len()
21351        }
21352    }
21353}
21354#[doc = "Request the overall list of mission items from the system/component."]
21355#[doc = ""]
21356#[doc = "ID: 43"]
21357#[derive(Debug, Clone, PartialEq)]
21358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21360#[cfg_attr(feature = "ts", derive(TS))]
21361#[cfg_attr(feature = "ts", ts(export))]
21362pub struct MISSION_REQUEST_LIST_DATA {
21363    #[doc = "System ID"]
21364    pub target_system: u8,
21365    #[doc = "Component ID"]
21366    pub target_component: u8,
21367    #[doc = "Mission type."]
21368    #[cfg_attr(feature = "serde", serde(default))]
21369    pub mission_type: MavMissionType,
21370}
21371impl MISSION_REQUEST_LIST_DATA {
21372    pub const ENCODED_LEN: usize = 3usize;
21373    pub const DEFAULT: Self = Self {
21374        target_system: 0_u8,
21375        target_component: 0_u8,
21376        mission_type: MavMissionType::DEFAULT,
21377    };
21378    #[cfg(feature = "arbitrary")]
21379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21380        use arbitrary::{Arbitrary, Unstructured};
21381        let mut buf = [0u8; 1024];
21382        rng.fill_bytes(&mut buf);
21383        let mut unstructured = Unstructured::new(&buf);
21384        Self::arbitrary(&mut unstructured).unwrap_or_default()
21385    }
21386}
21387impl Default for MISSION_REQUEST_LIST_DATA {
21388    fn default() -> Self {
21389        Self::DEFAULT.clone()
21390    }
21391}
21392impl MessageData for MISSION_REQUEST_LIST_DATA {
21393    type Message = MavMessage;
21394    const ID: u32 = 43u32;
21395    const NAME: &'static str = "MISSION_REQUEST_LIST";
21396    const EXTRA_CRC: u8 = 132u8;
21397    const ENCODED_LEN: usize = 3usize;
21398    fn deser(
21399        _version: MavlinkVersion,
21400        __input: &[u8],
21401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21402        let avail_len = __input.len();
21403        let mut payload_buf = [0; Self::ENCODED_LEN];
21404        let mut buf = if avail_len < Self::ENCODED_LEN {
21405            payload_buf[0..avail_len].copy_from_slice(__input);
21406            Bytes::new(&payload_buf)
21407        } else {
21408            Bytes::new(__input)
21409        };
21410        let mut __struct = Self::default();
21411        __struct.target_system = buf.get_u8();
21412        __struct.target_component = buf.get_u8();
21413        let tmp = buf.get_u8();
21414        __struct.mission_type =
21415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21416                enum_type: "MavMissionType",
21417                value: tmp as u64,
21418            })?;
21419        Ok(__struct)
21420    }
21421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21422        let mut __tmp = BytesMut::new(bytes);
21423        #[allow(clippy::absurd_extreme_comparisons)]
21424        #[allow(unused_comparisons)]
21425        if __tmp.remaining() < Self::ENCODED_LEN {
21426            panic!(
21427                "buffer is too small (need {} bytes, but got {})",
21428                Self::ENCODED_LEN,
21429                __tmp.remaining(),
21430            )
21431        }
21432        __tmp.put_u8(self.target_system);
21433        __tmp.put_u8(self.target_component);
21434        if matches!(version, MavlinkVersion::V2) {
21435            __tmp.put_u8(self.mission_type as u8);
21436            let len = __tmp.len();
21437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21438        } else {
21439            __tmp.len()
21440        }
21441    }
21442}
21443#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21444#[doc = ""]
21445#[doc = "ID: 37"]
21446#[derive(Debug, Clone, PartialEq)]
21447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21449#[cfg_attr(feature = "ts", derive(TS))]
21450#[cfg_attr(feature = "ts", ts(export))]
21451pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21452    #[doc = "Start index"]
21453    pub start_index: i16,
21454    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21455    pub end_index: i16,
21456    #[doc = "System ID"]
21457    pub target_system: u8,
21458    #[doc = "Component ID"]
21459    pub target_component: u8,
21460    #[doc = "Mission type."]
21461    #[cfg_attr(feature = "serde", serde(default))]
21462    pub mission_type: MavMissionType,
21463}
21464impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21465    pub const ENCODED_LEN: usize = 7usize;
21466    pub const DEFAULT: Self = Self {
21467        start_index: 0_i16,
21468        end_index: 0_i16,
21469        target_system: 0_u8,
21470        target_component: 0_u8,
21471        mission_type: MavMissionType::DEFAULT,
21472    };
21473    #[cfg(feature = "arbitrary")]
21474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21475        use arbitrary::{Arbitrary, Unstructured};
21476        let mut buf = [0u8; 1024];
21477        rng.fill_bytes(&mut buf);
21478        let mut unstructured = Unstructured::new(&buf);
21479        Self::arbitrary(&mut unstructured).unwrap_or_default()
21480    }
21481}
21482impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21483    fn default() -> Self {
21484        Self::DEFAULT.clone()
21485    }
21486}
21487impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21488    type Message = MavMessage;
21489    const ID: u32 = 37u32;
21490    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21491    const EXTRA_CRC: u8 = 212u8;
21492    const ENCODED_LEN: usize = 7usize;
21493    fn deser(
21494        _version: MavlinkVersion,
21495        __input: &[u8],
21496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21497        let avail_len = __input.len();
21498        let mut payload_buf = [0; Self::ENCODED_LEN];
21499        let mut buf = if avail_len < Self::ENCODED_LEN {
21500            payload_buf[0..avail_len].copy_from_slice(__input);
21501            Bytes::new(&payload_buf)
21502        } else {
21503            Bytes::new(__input)
21504        };
21505        let mut __struct = Self::default();
21506        __struct.start_index = buf.get_i16_le();
21507        __struct.end_index = buf.get_i16_le();
21508        __struct.target_system = buf.get_u8();
21509        __struct.target_component = buf.get_u8();
21510        let tmp = buf.get_u8();
21511        __struct.mission_type =
21512            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21513                enum_type: "MavMissionType",
21514                value: tmp as u64,
21515            })?;
21516        Ok(__struct)
21517    }
21518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21519        let mut __tmp = BytesMut::new(bytes);
21520        #[allow(clippy::absurd_extreme_comparisons)]
21521        #[allow(unused_comparisons)]
21522        if __tmp.remaining() < Self::ENCODED_LEN {
21523            panic!(
21524                "buffer is too small (need {} bytes, but got {})",
21525                Self::ENCODED_LEN,
21526                __tmp.remaining(),
21527            )
21528        }
21529        __tmp.put_i16_le(self.start_index);
21530        __tmp.put_i16_le(self.end_index);
21531        __tmp.put_u8(self.target_system);
21532        __tmp.put_u8(self.target_component);
21533        if matches!(version, MavlinkVersion::V2) {
21534            __tmp.put_u8(self.mission_type as u8);
21535            let len = __tmp.len();
21536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21537        } else {
21538            __tmp.len()
21539        }
21540    }
21541}
21542#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21543#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21544#[doc = ""]
21545#[doc = "ID: 41"]
21546#[derive(Debug, Clone, PartialEq)]
21547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21549#[cfg_attr(feature = "ts", derive(TS))]
21550#[cfg_attr(feature = "ts", ts(export))]
21551pub struct MISSION_SET_CURRENT_DATA {
21552    #[doc = "Sequence"]
21553    pub seq: u16,
21554    #[doc = "System ID"]
21555    pub target_system: u8,
21556    #[doc = "Component ID"]
21557    pub target_component: u8,
21558}
21559impl MISSION_SET_CURRENT_DATA {
21560    pub const ENCODED_LEN: usize = 4usize;
21561    pub const DEFAULT: Self = Self {
21562        seq: 0_u16,
21563        target_system: 0_u8,
21564        target_component: 0_u8,
21565    };
21566    #[cfg(feature = "arbitrary")]
21567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21568        use arbitrary::{Arbitrary, Unstructured};
21569        let mut buf = [0u8; 1024];
21570        rng.fill_bytes(&mut buf);
21571        let mut unstructured = Unstructured::new(&buf);
21572        Self::arbitrary(&mut unstructured).unwrap_or_default()
21573    }
21574}
21575impl Default for MISSION_SET_CURRENT_DATA {
21576    fn default() -> Self {
21577        Self::DEFAULT.clone()
21578    }
21579}
21580impl MessageData for MISSION_SET_CURRENT_DATA {
21581    type Message = MavMessage;
21582    const ID: u32 = 41u32;
21583    const NAME: &'static str = "MISSION_SET_CURRENT";
21584    const EXTRA_CRC: u8 = 28u8;
21585    const ENCODED_LEN: usize = 4usize;
21586    fn deser(
21587        _version: MavlinkVersion,
21588        __input: &[u8],
21589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21590        let avail_len = __input.len();
21591        let mut payload_buf = [0; Self::ENCODED_LEN];
21592        let mut buf = if avail_len < Self::ENCODED_LEN {
21593            payload_buf[0..avail_len].copy_from_slice(__input);
21594            Bytes::new(&payload_buf)
21595        } else {
21596            Bytes::new(__input)
21597        };
21598        let mut __struct = Self::default();
21599        __struct.seq = buf.get_u16_le();
21600        __struct.target_system = buf.get_u8();
21601        __struct.target_component = buf.get_u8();
21602        Ok(__struct)
21603    }
21604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21605        let mut __tmp = BytesMut::new(bytes);
21606        #[allow(clippy::absurd_extreme_comparisons)]
21607        #[allow(unused_comparisons)]
21608        if __tmp.remaining() < Self::ENCODED_LEN {
21609            panic!(
21610                "buffer is too small (need {} bytes, but got {})",
21611                Self::ENCODED_LEN,
21612                __tmp.remaining(),
21613            )
21614        }
21615        __tmp.put_u16_le(self.seq);
21616        __tmp.put_u8(self.target_system);
21617        __tmp.put_u8(self.target_component);
21618        if matches!(version, MavlinkVersion::V2) {
21619            let len = __tmp.len();
21620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21621        } else {
21622            __tmp.len()
21623        }
21624    }
21625}
21626#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21627#[doc = ""]
21628#[doc = "ID: 38"]
21629#[derive(Debug, Clone, PartialEq)]
21630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21632#[cfg_attr(feature = "ts", derive(TS))]
21633#[cfg_attr(feature = "ts", ts(export))]
21634pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21635    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21636    pub start_index: i16,
21637    #[doc = "End index, equal or greater than start index."]
21638    pub end_index: i16,
21639    #[doc = "System ID"]
21640    pub target_system: u8,
21641    #[doc = "Component ID"]
21642    pub target_component: u8,
21643    #[doc = "Mission type."]
21644    #[cfg_attr(feature = "serde", serde(default))]
21645    pub mission_type: MavMissionType,
21646}
21647impl MISSION_WRITE_PARTIAL_LIST_DATA {
21648    pub const ENCODED_LEN: usize = 7usize;
21649    pub const DEFAULT: Self = Self {
21650        start_index: 0_i16,
21651        end_index: 0_i16,
21652        target_system: 0_u8,
21653        target_component: 0_u8,
21654        mission_type: MavMissionType::DEFAULT,
21655    };
21656    #[cfg(feature = "arbitrary")]
21657    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21658        use arbitrary::{Arbitrary, Unstructured};
21659        let mut buf = [0u8; 1024];
21660        rng.fill_bytes(&mut buf);
21661        let mut unstructured = Unstructured::new(&buf);
21662        Self::arbitrary(&mut unstructured).unwrap_or_default()
21663    }
21664}
21665impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21666    fn default() -> Self {
21667        Self::DEFAULT.clone()
21668    }
21669}
21670impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21671    type Message = MavMessage;
21672    const ID: u32 = 38u32;
21673    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21674    const EXTRA_CRC: u8 = 9u8;
21675    const ENCODED_LEN: usize = 7usize;
21676    fn deser(
21677        _version: MavlinkVersion,
21678        __input: &[u8],
21679    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21680        let avail_len = __input.len();
21681        let mut payload_buf = [0; Self::ENCODED_LEN];
21682        let mut buf = if avail_len < Self::ENCODED_LEN {
21683            payload_buf[0..avail_len].copy_from_slice(__input);
21684            Bytes::new(&payload_buf)
21685        } else {
21686            Bytes::new(__input)
21687        };
21688        let mut __struct = Self::default();
21689        __struct.start_index = buf.get_i16_le();
21690        __struct.end_index = buf.get_i16_le();
21691        __struct.target_system = buf.get_u8();
21692        __struct.target_component = buf.get_u8();
21693        let tmp = buf.get_u8();
21694        __struct.mission_type =
21695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21696                enum_type: "MavMissionType",
21697                value: tmp as u64,
21698            })?;
21699        Ok(__struct)
21700    }
21701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21702        let mut __tmp = BytesMut::new(bytes);
21703        #[allow(clippy::absurd_extreme_comparisons)]
21704        #[allow(unused_comparisons)]
21705        if __tmp.remaining() < Self::ENCODED_LEN {
21706            panic!(
21707                "buffer is too small (need {} bytes, but got {})",
21708                Self::ENCODED_LEN,
21709                __tmp.remaining(),
21710            )
21711        }
21712        __tmp.put_i16_le(self.start_index);
21713        __tmp.put_i16_le(self.end_index);
21714        __tmp.put_u8(self.target_system);
21715        __tmp.put_u8(self.target_component);
21716        if matches!(version, MavlinkVersion::V2) {
21717            __tmp.put_u8(self.mission_type as u8);
21718            let len = __tmp.len();
21719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21720        } else {
21721            __tmp.len()
21722        }
21723    }
21724}
21725#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21726#[doc = "Orientation of a mount."]
21727#[doc = ""]
21728#[doc = "ID: 265"]
21729#[derive(Debug, Clone, PartialEq)]
21730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21732#[cfg_attr(feature = "ts", derive(TS))]
21733#[cfg_attr(feature = "ts", ts(export))]
21734pub struct MOUNT_ORIENTATION_DATA {
21735    #[doc = "Timestamp (time since system boot)."]
21736    pub time_boot_ms: u32,
21737    #[doc = "Roll in global frame (set to NaN for invalid)."]
21738    pub roll: f32,
21739    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21740    pub pitch: f32,
21741    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21742    pub yaw: f32,
21743    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21744    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21745    pub yaw_absolute: f32,
21746}
21747impl MOUNT_ORIENTATION_DATA {
21748    pub const ENCODED_LEN: usize = 20usize;
21749    pub const DEFAULT: Self = Self {
21750        time_boot_ms: 0_u32,
21751        roll: 0.0_f32,
21752        pitch: 0.0_f32,
21753        yaw: 0.0_f32,
21754        yaw_absolute: 0.0_f32,
21755    };
21756    #[cfg(feature = "arbitrary")]
21757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21758        use arbitrary::{Arbitrary, Unstructured};
21759        let mut buf = [0u8; 1024];
21760        rng.fill_bytes(&mut buf);
21761        let mut unstructured = Unstructured::new(&buf);
21762        Self::arbitrary(&mut unstructured).unwrap_or_default()
21763    }
21764}
21765impl Default for MOUNT_ORIENTATION_DATA {
21766    fn default() -> Self {
21767        Self::DEFAULT.clone()
21768    }
21769}
21770impl MessageData for MOUNT_ORIENTATION_DATA {
21771    type Message = MavMessage;
21772    const ID: u32 = 265u32;
21773    const NAME: &'static str = "MOUNT_ORIENTATION";
21774    const EXTRA_CRC: u8 = 26u8;
21775    const ENCODED_LEN: usize = 20usize;
21776    fn deser(
21777        _version: MavlinkVersion,
21778        __input: &[u8],
21779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21780        let avail_len = __input.len();
21781        let mut payload_buf = [0; Self::ENCODED_LEN];
21782        let mut buf = if avail_len < Self::ENCODED_LEN {
21783            payload_buf[0..avail_len].copy_from_slice(__input);
21784            Bytes::new(&payload_buf)
21785        } else {
21786            Bytes::new(__input)
21787        };
21788        let mut __struct = Self::default();
21789        __struct.time_boot_ms = buf.get_u32_le();
21790        __struct.roll = buf.get_f32_le();
21791        __struct.pitch = buf.get_f32_le();
21792        __struct.yaw = buf.get_f32_le();
21793        __struct.yaw_absolute = buf.get_f32_le();
21794        Ok(__struct)
21795    }
21796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21797        let mut __tmp = BytesMut::new(bytes);
21798        #[allow(clippy::absurd_extreme_comparisons)]
21799        #[allow(unused_comparisons)]
21800        if __tmp.remaining() < Self::ENCODED_LEN {
21801            panic!(
21802                "buffer is too small (need {} bytes, but got {})",
21803                Self::ENCODED_LEN,
21804                __tmp.remaining(),
21805            )
21806        }
21807        __tmp.put_u32_le(self.time_boot_ms);
21808        __tmp.put_f32_le(self.roll);
21809        __tmp.put_f32_le(self.pitch);
21810        __tmp.put_f32_le(self.yaw);
21811        if matches!(version, MavlinkVersion::V2) {
21812            __tmp.put_f32_le(self.yaw_absolute);
21813            let len = __tmp.len();
21814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21815        } else {
21816            __tmp.len()
21817        }
21818    }
21819}
21820#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21821#[doc = ""]
21822#[doc = "ID: 251"]
21823#[derive(Debug, Clone, PartialEq)]
21824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21826#[cfg_attr(feature = "ts", derive(TS))]
21827#[cfg_attr(feature = "ts", ts(export))]
21828pub struct NAMED_VALUE_FLOAT_DATA {
21829    #[doc = "Timestamp (time since system boot)."]
21830    pub time_boot_ms: u32,
21831    #[doc = "Floating point value"]
21832    pub value: f32,
21833    #[doc = "Name of the debug variable"]
21834    #[cfg_attr(feature = "ts", ts(type = "string"))]
21835    pub name: CharArray<10>,
21836}
21837impl NAMED_VALUE_FLOAT_DATA {
21838    pub const ENCODED_LEN: usize = 18usize;
21839    pub const DEFAULT: Self = Self {
21840        time_boot_ms: 0_u32,
21841        value: 0.0_f32,
21842        name: CharArray::new([0_u8; 10usize]),
21843    };
21844    #[cfg(feature = "arbitrary")]
21845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21846        use arbitrary::{Arbitrary, Unstructured};
21847        let mut buf = [0u8; 1024];
21848        rng.fill_bytes(&mut buf);
21849        let mut unstructured = Unstructured::new(&buf);
21850        Self::arbitrary(&mut unstructured).unwrap_or_default()
21851    }
21852}
21853impl Default for NAMED_VALUE_FLOAT_DATA {
21854    fn default() -> Self {
21855        Self::DEFAULT.clone()
21856    }
21857}
21858impl MessageData for NAMED_VALUE_FLOAT_DATA {
21859    type Message = MavMessage;
21860    const ID: u32 = 251u32;
21861    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21862    const EXTRA_CRC: u8 = 170u8;
21863    const ENCODED_LEN: usize = 18usize;
21864    fn deser(
21865        _version: MavlinkVersion,
21866        __input: &[u8],
21867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21868        let avail_len = __input.len();
21869        let mut payload_buf = [0; Self::ENCODED_LEN];
21870        let mut buf = if avail_len < Self::ENCODED_LEN {
21871            payload_buf[0..avail_len].copy_from_slice(__input);
21872            Bytes::new(&payload_buf)
21873        } else {
21874            Bytes::new(__input)
21875        };
21876        let mut __struct = Self::default();
21877        __struct.time_boot_ms = buf.get_u32_le();
21878        __struct.value = buf.get_f32_le();
21879        let mut tmp = [0_u8; 10usize];
21880        for v in &mut tmp {
21881            *v = buf.get_u8();
21882        }
21883        __struct.name = CharArray::new(tmp);
21884        Ok(__struct)
21885    }
21886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21887        let mut __tmp = BytesMut::new(bytes);
21888        #[allow(clippy::absurd_extreme_comparisons)]
21889        #[allow(unused_comparisons)]
21890        if __tmp.remaining() < Self::ENCODED_LEN {
21891            panic!(
21892                "buffer is too small (need {} bytes, but got {})",
21893                Self::ENCODED_LEN,
21894                __tmp.remaining(),
21895            )
21896        }
21897        __tmp.put_u32_le(self.time_boot_ms);
21898        __tmp.put_f32_le(self.value);
21899        for val in &self.name {
21900            __tmp.put_u8(*val);
21901        }
21902        if matches!(version, MavlinkVersion::V2) {
21903            let len = __tmp.len();
21904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21905        } else {
21906            __tmp.len()
21907        }
21908    }
21909}
21910#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21911#[doc = ""]
21912#[doc = "ID: 252"]
21913#[derive(Debug, Clone, PartialEq)]
21914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21916#[cfg_attr(feature = "ts", derive(TS))]
21917#[cfg_attr(feature = "ts", ts(export))]
21918pub struct NAMED_VALUE_INT_DATA {
21919    #[doc = "Timestamp (time since system boot)."]
21920    pub time_boot_ms: u32,
21921    #[doc = "Signed integer value"]
21922    pub value: i32,
21923    #[doc = "Name of the debug variable"]
21924    #[cfg_attr(feature = "ts", ts(type = "string"))]
21925    pub name: CharArray<10>,
21926}
21927impl NAMED_VALUE_INT_DATA {
21928    pub const ENCODED_LEN: usize = 18usize;
21929    pub const DEFAULT: Self = Self {
21930        time_boot_ms: 0_u32,
21931        value: 0_i32,
21932        name: CharArray::new([0_u8; 10usize]),
21933    };
21934    #[cfg(feature = "arbitrary")]
21935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21936        use arbitrary::{Arbitrary, Unstructured};
21937        let mut buf = [0u8; 1024];
21938        rng.fill_bytes(&mut buf);
21939        let mut unstructured = Unstructured::new(&buf);
21940        Self::arbitrary(&mut unstructured).unwrap_or_default()
21941    }
21942}
21943impl Default for NAMED_VALUE_INT_DATA {
21944    fn default() -> Self {
21945        Self::DEFAULT.clone()
21946    }
21947}
21948impl MessageData for NAMED_VALUE_INT_DATA {
21949    type Message = MavMessage;
21950    const ID: u32 = 252u32;
21951    const NAME: &'static str = "NAMED_VALUE_INT";
21952    const EXTRA_CRC: u8 = 44u8;
21953    const ENCODED_LEN: usize = 18usize;
21954    fn deser(
21955        _version: MavlinkVersion,
21956        __input: &[u8],
21957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21958        let avail_len = __input.len();
21959        let mut payload_buf = [0; Self::ENCODED_LEN];
21960        let mut buf = if avail_len < Self::ENCODED_LEN {
21961            payload_buf[0..avail_len].copy_from_slice(__input);
21962            Bytes::new(&payload_buf)
21963        } else {
21964            Bytes::new(__input)
21965        };
21966        let mut __struct = Self::default();
21967        __struct.time_boot_ms = buf.get_u32_le();
21968        __struct.value = buf.get_i32_le();
21969        let mut tmp = [0_u8; 10usize];
21970        for v in &mut tmp {
21971            *v = buf.get_u8();
21972        }
21973        __struct.name = CharArray::new(tmp);
21974        Ok(__struct)
21975    }
21976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21977        let mut __tmp = BytesMut::new(bytes);
21978        #[allow(clippy::absurd_extreme_comparisons)]
21979        #[allow(unused_comparisons)]
21980        if __tmp.remaining() < Self::ENCODED_LEN {
21981            panic!(
21982                "buffer is too small (need {} bytes, but got {})",
21983                Self::ENCODED_LEN,
21984                __tmp.remaining(),
21985            )
21986        }
21987        __tmp.put_u32_le(self.time_boot_ms);
21988        __tmp.put_i32_le(self.value);
21989        for val in &self.name {
21990            __tmp.put_u8(*val);
21991        }
21992        if matches!(version, MavlinkVersion::V2) {
21993            let len = __tmp.len();
21994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21995        } else {
21996            __tmp.len()
21997        }
21998    }
21999}
22000#[doc = "The state of the navigation and position controller."]
22001#[doc = ""]
22002#[doc = "ID: 62"]
22003#[derive(Debug, Clone, PartialEq)]
22004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22006#[cfg_attr(feature = "ts", derive(TS))]
22007#[cfg_attr(feature = "ts", ts(export))]
22008pub struct NAV_CONTROLLER_OUTPUT_DATA {
22009    #[doc = "Current desired roll"]
22010    pub nav_roll: f32,
22011    #[doc = "Current desired pitch"]
22012    pub nav_pitch: f32,
22013    #[doc = "Current altitude error"]
22014    pub alt_error: f32,
22015    #[doc = "Current airspeed error"]
22016    pub aspd_error: f32,
22017    #[doc = "Current crosstrack error on x-y plane"]
22018    pub xtrack_error: f32,
22019    #[doc = "Current desired heading"]
22020    pub nav_bearing: i16,
22021    #[doc = "Bearing to current waypoint/target"]
22022    pub target_bearing: i16,
22023    #[doc = "Distance to active waypoint"]
22024    pub wp_dist: u16,
22025}
22026impl NAV_CONTROLLER_OUTPUT_DATA {
22027    pub const ENCODED_LEN: usize = 26usize;
22028    pub const DEFAULT: Self = Self {
22029        nav_roll: 0.0_f32,
22030        nav_pitch: 0.0_f32,
22031        alt_error: 0.0_f32,
22032        aspd_error: 0.0_f32,
22033        xtrack_error: 0.0_f32,
22034        nav_bearing: 0_i16,
22035        target_bearing: 0_i16,
22036        wp_dist: 0_u16,
22037    };
22038    #[cfg(feature = "arbitrary")]
22039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22040        use arbitrary::{Arbitrary, Unstructured};
22041        let mut buf = [0u8; 1024];
22042        rng.fill_bytes(&mut buf);
22043        let mut unstructured = Unstructured::new(&buf);
22044        Self::arbitrary(&mut unstructured).unwrap_or_default()
22045    }
22046}
22047impl Default for NAV_CONTROLLER_OUTPUT_DATA {
22048    fn default() -> Self {
22049        Self::DEFAULT.clone()
22050    }
22051}
22052impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
22053    type Message = MavMessage;
22054    const ID: u32 = 62u32;
22055    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
22056    const EXTRA_CRC: u8 = 183u8;
22057    const ENCODED_LEN: usize = 26usize;
22058    fn deser(
22059        _version: MavlinkVersion,
22060        __input: &[u8],
22061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22062        let avail_len = __input.len();
22063        let mut payload_buf = [0; Self::ENCODED_LEN];
22064        let mut buf = if avail_len < Self::ENCODED_LEN {
22065            payload_buf[0..avail_len].copy_from_slice(__input);
22066            Bytes::new(&payload_buf)
22067        } else {
22068            Bytes::new(__input)
22069        };
22070        let mut __struct = Self::default();
22071        __struct.nav_roll = buf.get_f32_le();
22072        __struct.nav_pitch = buf.get_f32_le();
22073        __struct.alt_error = buf.get_f32_le();
22074        __struct.aspd_error = buf.get_f32_le();
22075        __struct.xtrack_error = buf.get_f32_le();
22076        __struct.nav_bearing = buf.get_i16_le();
22077        __struct.target_bearing = buf.get_i16_le();
22078        __struct.wp_dist = buf.get_u16_le();
22079        Ok(__struct)
22080    }
22081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22082        let mut __tmp = BytesMut::new(bytes);
22083        #[allow(clippy::absurd_extreme_comparisons)]
22084        #[allow(unused_comparisons)]
22085        if __tmp.remaining() < Self::ENCODED_LEN {
22086            panic!(
22087                "buffer is too small (need {} bytes, but got {})",
22088                Self::ENCODED_LEN,
22089                __tmp.remaining(),
22090            )
22091        }
22092        __tmp.put_f32_le(self.nav_roll);
22093        __tmp.put_f32_le(self.nav_pitch);
22094        __tmp.put_f32_le(self.alt_error);
22095        __tmp.put_f32_le(self.aspd_error);
22096        __tmp.put_f32_le(self.xtrack_error);
22097        __tmp.put_i16_le(self.nav_bearing);
22098        __tmp.put_i16_le(self.target_bearing);
22099        __tmp.put_u16_le(self.wp_dist);
22100        if matches!(version, MavlinkVersion::V2) {
22101            let len = __tmp.len();
22102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22103        } else {
22104            __tmp.len()
22105        }
22106    }
22107}
22108#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
22109#[doc = ""]
22110#[doc = "ID: 330"]
22111#[derive(Debug, Clone, PartialEq)]
22112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22114#[cfg_attr(feature = "ts", derive(TS))]
22115#[cfg_attr(feature = "ts", ts(export))]
22116pub struct OBSTACLE_DISTANCE_DATA {
22117    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22118    pub time_usec: u64,
22119    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
22120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22122    pub distances: [u16; 72],
22123    #[doc = "Minimum distance the sensor can measure."]
22124    pub min_distance: u16,
22125    #[doc = "Maximum distance the sensor can measure."]
22126    pub max_distance: u16,
22127    #[doc = "Class id of the distance sensor type."]
22128    pub sensor_type: MavDistanceSensor,
22129    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
22130    pub increment: u8,
22131    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
22132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22133    pub increment_f: f32,
22134    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
22135    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22136    pub angle_offset: f32,
22137    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
22138    #[cfg_attr(feature = "serde", serde(default))]
22139    pub frame: MavFrame,
22140}
22141impl OBSTACLE_DISTANCE_DATA {
22142    pub const ENCODED_LEN: usize = 167usize;
22143    pub const DEFAULT: Self = Self {
22144        time_usec: 0_u64,
22145        distances: [0_u16; 72usize],
22146        min_distance: 0_u16,
22147        max_distance: 0_u16,
22148        sensor_type: MavDistanceSensor::DEFAULT,
22149        increment: 0_u8,
22150        increment_f: 0.0_f32,
22151        angle_offset: 0.0_f32,
22152        frame: MavFrame::DEFAULT,
22153    };
22154    #[cfg(feature = "arbitrary")]
22155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22156        use arbitrary::{Arbitrary, Unstructured};
22157        let mut buf = [0u8; 1024];
22158        rng.fill_bytes(&mut buf);
22159        let mut unstructured = Unstructured::new(&buf);
22160        Self::arbitrary(&mut unstructured).unwrap_or_default()
22161    }
22162}
22163impl Default for OBSTACLE_DISTANCE_DATA {
22164    fn default() -> Self {
22165        Self::DEFAULT.clone()
22166    }
22167}
22168impl MessageData for OBSTACLE_DISTANCE_DATA {
22169    type Message = MavMessage;
22170    const ID: u32 = 330u32;
22171    const NAME: &'static str = "OBSTACLE_DISTANCE";
22172    const EXTRA_CRC: u8 = 23u8;
22173    const ENCODED_LEN: usize = 167usize;
22174    fn deser(
22175        _version: MavlinkVersion,
22176        __input: &[u8],
22177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22178        let avail_len = __input.len();
22179        let mut payload_buf = [0; Self::ENCODED_LEN];
22180        let mut buf = if avail_len < Self::ENCODED_LEN {
22181            payload_buf[0..avail_len].copy_from_slice(__input);
22182            Bytes::new(&payload_buf)
22183        } else {
22184            Bytes::new(__input)
22185        };
22186        let mut __struct = Self::default();
22187        __struct.time_usec = buf.get_u64_le();
22188        for v in &mut __struct.distances {
22189            let val = buf.get_u16_le();
22190            *v = val;
22191        }
22192        __struct.min_distance = buf.get_u16_le();
22193        __struct.max_distance = buf.get_u16_le();
22194        let tmp = buf.get_u8();
22195        __struct.sensor_type =
22196            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22197                enum_type: "MavDistanceSensor",
22198                value: tmp as u64,
22199            })?;
22200        __struct.increment = buf.get_u8();
22201        __struct.increment_f = buf.get_f32_le();
22202        __struct.angle_offset = buf.get_f32_le();
22203        let tmp = buf.get_u8();
22204        __struct.frame =
22205            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22206                enum_type: "MavFrame",
22207                value: tmp as u64,
22208            })?;
22209        Ok(__struct)
22210    }
22211    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22212        let mut __tmp = BytesMut::new(bytes);
22213        #[allow(clippy::absurd_extreme_comparisons)]
22214        #[allow(unused_comparisons)]
22215        if __tmp.remaining() < Self::ENCODED_LEN {
22216            panic!(
22217                "buffer is too small (need {} bytes, but got {})",
22218                Self::ENCODED_LEN,
22219                __tmp.remaining(),
22220            )
22221        }
22222        __tmp.put_u64_le(self.time_usec);
22223        for val in &self.distances {
22224            __tmp.put_u16_le(*val);
22225        }
22226        __tmp.put_u16_le(self.min_distance);
22227        __tmp.put_u16_le(self.max_distance);
22228        __tmp.put_u8(self.sensor_type as u8);
22229        __tmp.put_u8(self.increment);
22230        if matches!(version, MavlinkVersion::V2) {
22231            __tmp.put_f32_le(self.increment_f);
22232            __tmp.put_f32_le(self.angle_offset);
22233            __tmp.put_u8(self.frame as u8);
22234            let len = __tmp.len();
22235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22236        } else {
22237            __tmp.len()
22238        }
22239    }
22240}
22241#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
22242#[doc = ""]
22243#[doc = "ID: 331"]
22244#[derive(Debug, Clone, PartialEq)]
22245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22247#[cfg_attr(feature = "ts", derive(TS))]
22248#[cfg_attr(feature = "ts", ts(export))]
22249pub struct ODOMETRY_DATA {
22250    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22251    pub time_usec: u64,
22252    #[doc = "X Position"]
22253    pub x: f32,
22254    #[doc = "Y Position"]
22255    pub y: f32,
22256    #[doc = "Z Position"]
22257    pub z: f32,
22258    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22261    pub q: [f32; 4],
22262    #[doc = "X linear speed"]
22263    pub vx: f32,
22264    #[doc = "Y linear speed"]
22265    pub vy: f32,
22266    #[doc = "Z linear speed"]
22267    pub vz: f32,
22268    #[doc = "Roll angular speed"]
22269    pub rollspeed: f32,
22270    #[doc = "Pitch angular speed"]
22271    pub pitchspeed: f32,
22272    #[doc = "Yaw angular speed"]
22273    pub yawspeed: f32,
22274    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22276    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22277    pub pose_covariance: [f32; 21],
22278    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22279    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22280    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22281    pub velocity_covariance: [f32; 21],
22282    #[doc = "Coordinate frame of reference for the pose data."]
22283    pub frame_id: MavFrame,
22284    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22285    pub child_frame_id: MavFrame,
22286    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22287    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22288    pub reset_counter: u8,
22289    #[doc = "Type of estimator that is providing the odometry."]
22290    #[cfg_attr(feature = "serde", serde(default))]
22291    pub estimator_type: MavEstimatorType,
22292    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22293    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22294    pub quality: i8,
22295}
22296impl ODOMETRY_DATA {
22297    pub const ENCODED_LEN: usize = 233usize;
22298    pub const DEFAULT: Self = Self {
22299        time_usec: 0_u64,
22300        x: 0.0_f32,
22301        y: 0.0_f32,
22302        z: 0.0_f32,
22303        q: [0.0_f32; 4usize],
22304        vx: 0.0_f32,
22305        vy: 0.0_f32,
22306        vz: 0.0_f32,
22307        rollspeed: 0.0_f32,
22308        pitchspeed: 0.0_f32,
22309        yawspeed: 0.0_f32,
22310        pose_covariance: [0.0_f32; 21usize],
22311        velocity_covariance: [0.0_f32; 21usize],
22312        frame_id: MavFrame::DEFAULT,
22313        child_frame_id: MavFrame::DEFAULT,
22314        reset_counter: 0_u8,
22315        estimator_type: MavEstimatorType::DEFAULT,
22316        quality: 0_i8,
22317    };
22318    #[cfg(feature = "arbitrary")]
22319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22320        use arbitrary::{Arbitrary, Unstructured};
22321        let mut buf = [0u8; 1024];
22322        rng.fill_bytes(&mut buf);
22323        let mut unstructured = Unstructured::new(&buf);
22324        Self::arbitrary(&mut unstructured).unwrap_or_default()
22325    }
22326}
22327impl Default for ODOMETRY_DATA {
22328    fn default() -> Self {
22329        Self::DEFAULT.clone()
22330    }
22331}
22332impl MessageData for ODOMETRY_DATA {
22333    type Message = MavMessage;
22334    const ID: u32 = 331u32;
22335    const NAME: &'static str = "ODOMETRY";
22336    const EXTRA_CRC: u8 = 91u8;
22337    const ENCODED_LEN: usize = 233usize;
22338    fn deser(
22339        _version: MavlinkVersion,
22340        __input: &[u8],
22341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22342        let avail_len = __input.len();
22343        let mut payload_buf = [0; Self::ENCODED_LEN];
22344        let mut buf = if avail_len < Self::ENCODED_LEN {
22345            payload_buf[0..avail_len].copy_from_slice(__input);
22346            Bytes::new(&payload_buf)
22347        } else {
22348            Bytes::new(__input)
22349        };
22350        let mut __struct = Self::default();
22351        __struct.time_usec = buf.get_u64_le();
22352        __struct.x = buf.get_f32_le();
22353        __struct.y = buf.get_f32_le();
22354        __struct.z = buf.get_f32_le();
22355        for v in &mut __struct.q {
22356            let val = buf.get_f32_le();
22357            *v = val;
22358        }
22359        __struct.vx = buf.get_f32_le();
22360        __struct.vy = buf.get_f32_le();
22361        __struct.vz = buf.get_f32_le();
22362        __struct.rollspeed = buf.get_f32_le();
22363        __struct.pitchspeed = buf.get_f32_le();
22364        __struct.yawspeed = buf.get_f32_le();
22365        for v in &mut __struct.pose_covariance {
22366            let val = buf.get_f32_le();
22367            *v = val;
22368        }
22369        for v in &mut __struct.velocity_covariance {
22370            let val = buf.get_f32_le();
22371            *v = val;
22372        }
22373        let tmp = buf.get_u8();
22374        __struct.frame_id =
22375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22376                enum_type: "MavFrame",
22377                value: tmp as u64,
22378            })?;
22379        let tmp = buf.get_u8();
22380        __struct.child_frame_id =
22381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22382                enum_type: "MavFrame",
22383                value: tmp as u64,
22384            })?;
22385        __struct.reset_counter = buf.get_u8();
22386        let tmp = buf.get_u8();
22387        __struct.estimator_type =
22388            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22389                enum_type: "MavEstimatorType",
22390                value: tmp as u64,
22391            })?;
22392        __struct.quality = buf.get_i8();
22393        Ok(__struct)
22394    }
22395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22396        let mut __tmp = BytesMut::new(bytes);
22397        #[allow(clippy::absurd_extreme_comparisons)]
22398        #[allow(unused_comparisons)]
22399        if __tmp.remaining() < Self::ENCODED_LEN {
22400            panic!(
22401                "buffer is too small (need {} bytes, but got {})",
22402                Self::ENCODED_LEN,
22403                __tmp.remaining(),
22404            )
22405        }
22406        __tmp.put_u64_le(self.time_usec);
22407        __tmp.put_f32_le(self.x);
22408        __tmp.put_f32_le(self.y);
22409        __tmp.put_f32_le(self.z);
22410        for val in &self.q {
22411            __tmp.put_f32_le(*val);
22412        }
22413        __tmp.put_f32_le(self.vx);
22414        __tmp.put_f32_le(self.vy);
22415        __tmp.put_f32_le(self.vz);
22416        __tmp.put_f32_le(self.rollspeed);
22417        __tmp.put_f32_le(self.pitchspeed);
22418        __tmp.put_f32_le(self.yawspeed);
22419        for val in &self.pose_covariance {
22420            __tmp.put_f32_le(*val);
22421        }
22422        for val in &self.velocity_covariance {
22423            __tmp.put_f32_le(*val);
22424        }
22425        __tmp.put_u8(self.frame_id as u8);
22426        __tmp.put_u8(self.child_frame_id as u8);
22427        if matches!(version, MavlinkVersion::V2) {
22428            __tmp.put_u8(self.reset_counter);
22429            __tmp.put_u8(self.estimator_type as u8);
22430            __tmp.put_i8(self.quality);
22431            let len = __tmp.len();
22432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22433        } else {
22434            __tmp.len()
22435        }
22436    }
22437}
22438#[doc = "Hardware status sent by an onboard computer."]
22439#[doc = ""]
22440#[doc = "ID: 390"]
22441#[derive(Debug, Clone, PartialEq)]
22442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22444#[cfg_attr(feature = "ts", derive(TS))]
22445#[cfg_attr(feature = "ts", ts(export))]
22446pub struct ONBOARD_COMPUTER_STATUS_DATA {
22447    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22448    pub time_usec: u64,
22449    #[doc = "Time since system boot."]
22450    pub uptime: u32,
22451    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22452    pub ram_usage: u32,
22453    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22454    pub ram_total: u32,
22455    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22458    pub storage_type: [u32; 4],
22459    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22461    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22462    pub storage_usage: [u32; 4],
22463    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22466    pub storage_total: [u32; 4],
22467    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22470    pub link_type: [u32; 6],
22471    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22474    pub link_tx_rate: [u32; 6],
22475    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22478    pub link_rx_rate: [u32; 6],
22479    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22482    pub link_tx_max: [u32; 6],
22483    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22486    pub link_rx_max: [u32; 6],
22487    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22489    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22490    pub fan_speed: [i16; 4],
22491    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22492    pub mavtype: u8,
22493    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22495    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22496    pub cpu_cores: [u8; 8],
22497    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22498    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22499    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22500    pub cpu_combined: [u8; 10],
22501    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22504    pub gpu_cores: [u8; 4],
22505    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22507    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22508    pub gpu_combined: [u8; 10],
22509    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22510    pub temperature_board: i8,
22511    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22514    pub temperature_core: [i8; 8],
22515}
22516impl ONBOARD_COMPUTER_STATUS_DATA {
22517    pub const ENCODED_LEN: usize = 238usize;
22518    pub const DEFAULT: Self = Self {
22519        time_usec: 0_u64,
22520        uptime: 0_u32,
22521        ram_usage: 0_u32,
22522        ram_total: 0_u32,
22523        storage_type: [0_u32; 4usize],
22524        storage_usage: [0_u32; 4usize],
22525        storage_total: [0_u32; 4usize],
22526        link_type: [0_u32; 6usize],
22527        link_tx_rate: [0_u32; 6usize],
22528        link_rx_rate: [0_u32; 6usize],
22529        link_tx_max: [0_u32; 6usize],
22530        link_rx_max: [0_u32; 6usize],
22531        fan_speed: [0_i16; 4usize],
22532        mavtype: 0_u8,
22533        cpu_cores: [0_u8; 8usize],
22534        cpu_combined: [0_u8; 10usize],
22535        gpu_cores: [0_u8; 4usize],
22536        gpu_combined: [0_u8; 10usize],
22537        temperature_board: 0_i8,
22538        temperature_core: [0_i8; 8usize],
22539    };
22540    #[cfg(feature = "arbitrary")]
22541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22542        use arbitrary::{Arbitrary, Unstructured};
22543        let mut buf = [0u8; 1024];
22544        rng.fill_bytes(&mut buf);
22545        let mut unstructured = Unstructured::new(&buf);
22546        Self::arbitrary(&mut unstructured).unwrap_or_default()
22547    }
22548}
22549impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22550    fn default() -> Self {
22551        Self::DEFAULT.clone()
22552    }
22553}
22554impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22555    type Message = MavMessage;
22556    const ID: u32 = 390u32;
22557    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22558    const EXTRA_CRC: u8 = 156u8;
22559    const ENCODED_LEN: usize = 238usize;
22560    fn deser(
22561        _version: MavlinkVersion,
22562        __input: &[u8],
22563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22564        let avail_len = __input.len();
22565        let mut payload_buf = [0; Self::ENCODED_LEN];
22566        let mut buf = if avail_len < Self::ENCODED_LEN {
22567            payload_buf[0..avail_len].copy_from_slice(__input);
22568            Bytes::new(&payload_buf)
22569        } else {
22570            Bytes::new(__input)
22571        };
22572        let mut __struct = Self::default();
22573        __struct.time_usec = buf.get_u64_le();
22574        __struct.uptime = buf.get_u32_le();
22575        __struct.ram_usage = buf.get_u32_le();
22576        __struct.ram_total = buf.get_u32_le();
22577        for v in &mut __struct.storage_type {
22578            let val = buf.get_u32_le();
22579            *v = val;
22580        }
22581        for v in &mut __struct.storage_usage {
22582            let val = buf.get_u32_le();
22583            *v = val;
22584        }
22585        for v in &mut __struct.storage_total {
22586            let val = buf.get_u32_le();
22587            *v = val;
22588        }
22589        for v in &mut __struct.link_type {
22590            let val = buf.get_u32_le();
22591            *v = val;
22592        }
22593        for v in &mut __struct.link_tx_rate {
22594            let val = buf.get_u32_le();
22595            *v = val;
22596        }
22597        for v in &mut __struct.link_rx_rate {
22598            let val = buf.get_u32_le();
22599            *v = val;
22600        }
22601        for v in &mut __struct.link_tx_max {
22602            let val = buf.get_u32_le();
22603            *v = val;
22604        }
22605        for v in &mut __struct.link_rx_max {
22606            let val = buf.get_u32_le();
22607            *v = val;
22608        }
22609        for v in &mut __struct.fan_speed {
22610            let val = buf.get_i16_le();
22611            *v = val;
22612        }
22613        __struct.mavtype = buf.get_u8();
22614        for v in &mut __struct.cpu_cores {
22615            let val = buf.get_u8();
22616            *v = val;
22617        }
22618        for v in &mut __struct.cpu_combined {
22619            let val = buf.get_u8();
22620            *v = val;
22621        }
22622        for v in &mut __struct.gpu_cores {
22623            let val = buf.get_u8();
22624            *v = val;
22625        }
22626        for v in &mut __struct.gpu_combined {
22627            let val = buf.get_u8();
22628            *v = val;
22629        }
22630        __struct.temperature_board = buf.get_i8();
22631        for v in &mut __struct.temperature_core {
22632            let val = buf.get_i8();
22633            *v = val;
22634        }
22635        Ok(__struct)
22636    }
22637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22638        let mut __tmp = BytesMut::new(bytes);
22639        #[allow(clippy::absurd_extreme_comparisons)]
22640        #[allow(unused_comparisons)]
22641        if __tmp.remaining() < Self::ENCODED_LEN {
22642            panic!(
22643                "buffer is too small (need {} bytes, but got {})",
22644                Self::ENCODED_LEN,
22645                __tmp.remaining(),
22646            )
22647        }
22648        __tmp.put_u64_le(self.time_usec);
22649        __tmp.put_u32_le(self.uptime);
22650        __tmp.put_u32_le(self.ram_usage);
22651        __tmp.put_u32_le(self.ram_total);
22652        for val in &self.storage_type {
22653            __tmp.put_u32_le(*val);
22654        }
22655        for val in &self.storage_usage {
22656            __tmp.put_u32_le(*val);
22657        }
22658        for val in &self.storage_total {
22659            __tmp.put_u32_le(*val);
22660        }
22661        for val in &self.link_type {
22662            __tmp.put_u32_le(*val);
22663        }
22664        for val in &self.link_tx_rate {
22665            __tmp.put_u32_le(*val);
22666        }
22667        for val in &self.link_rx_rate {
22668            __tmp.put_u32_le(*val);
22669        }
22670        for val in &self.link_tx_max {
22671            __tmp.put_u32_le(*val);
22672        }
22673        for val in &self.link_rx_max {
22674            __tmp.put_u32_le(*val);
22675        }
22676        for val in &self.fan_speed {
22677            __tmp.put_i16_le(*val);
22678        }
22679        __tmp.put_u8(self.mavtype);
22680        for val in &self.cpu_cores {
22681            __tmp.put_u8(*val);
22682        }
22683        for val in &self.cpu_combined {
22684            __tmp.put_u8(*val);
22685        }
22686        for val in &self.gpu_cores {
22687            __tmp.put_u8(*val);
22688        }
22689        for val in &self.gpu_combined {
22690            __tmp.put_u8(*val);
22691        }
22692        __tmp.put_i8(self.temperature_board);
22693        for val in &self.temperature_core {
22694            __tmp.put_i8(*val);
22695        }
22696        if matches!(version, MavlinkVersion::V2) {
22697            let len = __tmp.len();
22698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22699        } else {
22700            __tmp.len()
22701        }
22702    }
22703}
22704#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22705#[doc = ""]
22706#[doc = "ID: 12918"]
22707#[derive(Debug, Clone, PartialEq)]
22708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22710#[cfg_attr(feature = "ts", derive(TS))]
22711#[cfg_attr(feature = "ts", ts(export))]
22712pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22713    #[doc = "Status level indicating if arming is allowed."]
22714    pub status: MavOdidArmStatus,
22715    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22716    #[cfg_attr(feature = "ts", ts(type = "string"))]
22717    pub error: CharArray<50>,
22718}
22719impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22720    pub const ENCODED_LEN: usize = 51usize;
22721    pub const DEFAULT: Self = Self {
22722        status: MavOdidArmStatus::DEFAULT,
22723        error: CharArray::new([0_u8; 50usize]),
22724    };
22725    #[cfg(feature = "arbitrary")]
22726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22727        use arbitrary::{Arbitrary, Unstructured};
22728        let mut buf = [0u8; 1024];
22729        rng.fill_bytes(&mut buf);
22730        let mut unstructured = Unstructured::new(&buf);
22731        Self::arbitrary(&mut unstructured).unwrap_or_default()
22732    }
22733}
22734impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22735    fn default() -> Self {
22736        Self::DEFAULT.clone()
22737    }
22738}
22739impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22740    type Message = MavMessage;
22741    const ID: u32 = 12918u32;
22742    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22743    const EXTRA_CRC: u8 = 139u8;
22744    const ENCODED_LEN: usize = 51usize;
22745    fn deser(
22746        _version: MavlinkVersion,
22747        __input: &[u8],
22748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22749        let avail_len = __input.len();
22750        let mut payload_buf = [0; Self::ENCODED_LEN];
22751        let mut buf = if avail_len < Self::ENCODED_LEN {
22752            payload_buf[0..avail_len].copy_from_slice(__input);
22753            Bytes::new(&payload_buf)
22754        } else {
22755            Bytes::new(__input)
22756        };
22757        let mut __struct = Self::default();
22758        let tmp = buf.get_u8();
22759        __struct.status =
22760            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22761                enum_type: "MavOdidArmStatus",
22762                value: tmp as u64,
22763            })?;
22764        let mut tmp = [0_u8; 50usize];
22765        for v in &mut tmp {
22766            *v = buf.get_u8();
22767        }
22768        __struct.error = CharArray::new(tmp);
22769        Ok(__struct)
22770    }
22771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22772        let mut __tmp = BytesMut::new(bytes);
22773        #[allow(clippy::absurd_extreme_comparisons)]
22774        #[allow(unused_comparisons)]
22775        if __tmp.remaining() < Self::ENCODED_LEN {
22776            panic!(
22777                "buffer is too small (need {} bytes, but got {})",
22778                Self::ENCODED_LEN,
22779                __tmp.remaining(),
22780            )
22781        }
22782        __tmp.put_u8(self.status as u8);
22783        for val in &self.error {
22784            __tmp.put_u8(*val);
22785        }
22786        if matches!(version, MavlinkVersion::V2) {
22787            let len = __tmp.len();
22788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22789        } else {
22790            __tmp.len()
22791        }
22792    }
22793}
22794#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22795#[doc = ""]
22796#[doc = "ID: 12902"]
22797#[derive(Debug, Clone, PartialEq)]
22798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22800#[cfg_attr(feature = "ts", derive(TS))]
22801#[cfg_attr(feature = "ts", ts(export))]
22802pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22803    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22804    pub timestamp: u32,
22805    #[doc = "System ID (0 for broadcast)."]
22806    pub target_system: u8,
22807    #[doc = "Component ID (0 for broadcast)."]
22808    pub target_component: u8,
22809    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22810    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22811    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22812    pub id_or_mac: [u8; 20],
22813    #[doc = "Indicates the type of authentication."]
22814    pub authentication_type: MavOdidAuthType,
22815    #[doc = "Allowed range is 0 - 15."]
22816    pub data_page: u8,
22817    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22818    pub last_page_index: u8,
22819    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22820    pub length: u8,
22821    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22823    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22824    pub authentication_data: [u8; 23],
22825}
22826impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22827    pub const ENCODED_LEN: usize = 53usize;
22828    pub const DEFAULT: Self = Self {
22829        timestamp: 0_u32,
22830        target_system: 0_u8,
22831        target_component: 0_u8,
22832        id_or_mac: [0_u8; 20usize],
22833        authentication_type: MavOdidAuthType::DEFAULT,
22834        data_page: 0_u8,
22835        last_page_index: 0_u8,
22836        length: 0_u8,
22837        authentication_data: [0_u8; 23usize],
22838    };
22839    #[cfg(feature = "arbitrary")]
22840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22841        use arbitrary::{Arbitrary, Unstructured};
22842        let mut buf = [0u8; 1024];
22843        rng.fill_bytes(&mut buf);
22844        let mut unstructured = Unstructured::new(&buf);
22845        Self::arbitrary(&mut unstructured).unwrap_or_default()
22846    }
22847}
22848impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22849    fn default() -> Self {
22850        Self::DEFAULT.clone()
22851    }
22852}
22853impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22854    type Message = MavMessage;
22855    const ID: u32 = 12902u32;
22856    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22857    const EXTRA_CRC: u8 = 140u8;
22858    const ENCODED_LEN: usize = 53usize;
22859    fn deser(
22860        _version: MavlinkVersion,
22861        __input: &[u8],
22862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22863        let avail_len = __input.len();
22864        let mut payload_buf = [0; Self::ENCODED_LEN];
22865        let mut buf = if avail_len < Self::ENCODED_LEN {
22866            payload_buf[0..avail_len].copy_from_slice(__input);
22867            Bytes::new(&payload_buf)
22868        } else {
22869            Bytes::new(__input)
22870        };
22871        let mut __struct = Self::default();
22872        __struct.timestamp = buf.get_u32_le();
22873        __struct.target_system = buf.get_u8();
22874        __struct.target_component = buf.get_u8();
22875        for v in &mut __struct.id_or_mac {
22876            let val = buf.get_u8();
22877            *v = val;
22878        }
22879        let tmp = buf.get_u8();
22880        __struct.authentication_type =
22881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22882                enum_type: "MavOdidAuthType",
22883                value: tmp as u64,
22884            })?;
22885        __struct.data_page = buf.get_u8();
22886        __struct.last_page_index = buf.get_u8();
22887        __struct.length = buf.get_u8();
22888        for v in &mut __struct.authentication_data {
22889            let val = buf.get_u8();
22890            *v = val;
22891        }
22892        Ok(__struct)
22893    }
22894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22895        let mut __tmp = BytesMut::new(bytes);
22896        #[allow(clippy::absurd_extreme_comparisons)]
22897        #[allow(unused_comparisons)]
22898        if __tmp.remaining() < Self::ENCODED_LEN {
22899            panic!(
22900                "buffer is too small (need {} bytes, but got {})",
22901                Self::ENCODED_LEN,
22902                __tmp.remaining(),
22903            )
22904        }
22905        __tmp.put_u32_le(self.timestamp);
22906        __tmp.put_u8(self.target_system);
22907        __tmp.put_u8(self.target_component);
22908        for val in &self.id_or_mac {
22909            __tmp.put_u8(*val);
22910        }
22911        __tmp.put_u8(self.authentication_type as u8);
22912        __tmp.put_u8(self.data_page);
22913        __tmp.put_u8(self.last_page_index);
22914        __tmp.put_u8(self.length);
22915        for val in &self.authentication_data {
22916            __tmp.put_u8(*val);
22917        }
22918        if matches!(version, MavlinkVersion::V2) {
22919            let len = __tmp.len();
22920            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22921        } else {
22922            __tmp.len()
22923        }
22924    }
22925}
22926#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22927#[doc = ""]
22928#[doc = "ID: 12900"]
22929#[derive(Debug, Clone, PartialEq)]
22930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22932#[cfg_attr(feature = "ts", derive(TS))]
22933#[cfg_attr(feature = "ts", ts(export))]
22934pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22935    #[doc = "System ID (0 for broadcast)."]
22936    pub target_system: u8,
22937    #[doc = "Component ID (0 for broadcast)."]
22938    pub target_component: u8,
22939    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22940    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22941    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22942    pub id_or_mac: [u8; 20],
22943    #[doc = "Indicates the format for the uas_id field of this message."]
22944    pub id_type: MavOdidIdType,
22945    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22946    pub ua_type: MavOdidUaType,
22947    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22950    pub uas_id: [u8; 20],
22951}
22952impl OPEN_DRONE_ID_BASIC_ID_DATA {
22953    pub const ENCODED_LEN: usize = 44usize;
22954    pub const DEFAULT: Self = Self {
22955        target_system: 0_u8,
22956        target_component: 0_u8,
22957        id_or_mac: [0_u8; 20usize],
22958        id_type: MavOdidIdType::DEFAULT,
22959        ua_type: MavOdidUaType::DEFAULT,
22960        uas_id: [0_u8; 20usize],
22961    };
22962    #[cfg(feature = "arbitrary")]
22963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22964        use arbitrary::{Arbitrary, Unstructured};
22965        let mut buf = [0u8; 1024];
22966        rng.fill_bytes(&mut buf);
22967        let mut unstructured = Unstructured::new(&buf);
22968        Self::arbitrary(&mut unstructured).unwrap_or_default()
22969    }
22970}
22971impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22972    fn default() -> Self {
22973        Self::DEFAULT.clone()
22974    }
22975}
22976impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22977    type Message = MavMessage;
22978    const ID: u32 = 12900u32;
22979    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22980    const EXTRA_CRC: u8 = 114u8;
22981    const ENCODED_LEN: usize = 44usize;
22982    fn deser(
22983        _version: MavlinkVersion,
22984        __input: &[u8],
22985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22986        let avail_len = __input.len();
22987        let mut payload_buf = [0; Self::ENCODED_LEN];
22988        let mut buf = if avail_len < Self::ENCODED_LEN {
22989            payload_buf[0..avail_len].copy_from_slice(__input);
22990            Bytes::new(&payload_buf)
22991        } else {
22992            Bytes::new(__input)
22993        };
22994        let mut __struct = Self::default();
22995        __struct.target_system = buf.get_u8();
22996        __struct.target_component = buf.get_u8();
22997        for v in &mut __struct.id_or_mac {
22998            let val = buf.get_u8();
22999            *v = val;
23000        }
23001        let tmp = buf.get_u8();
23002        __struct.id_type =
23003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23004                enum_type: "MavOdidIdType",
23005                value: tmp as u64,
23006            })?;
23007        let tmp = buf.get_u8();
23008        __struct.ua_type =
23009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23010                enum_type: "MavOdidUaType",
23011                value: tmp as u64,
23012            })?;
23013        for v in &mut __struct.uas_id {
23014            let val = buf.get_u8();
23015            *v = val;
23016        }
23017        Ok(__struct)
23018    }
23019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23020        let mut __tmp = BytesMut::new(bytes);
23021        #[allow(clippy::absurd_extreme_comparisons)]
23022        #[allow(unused_comparisons)]
23023        if __tmp.remaining() < Self::ENCODED_LEN {
23024            panic!(
23025                "buffer is too small (need {} bytes, but got {})",
23026                Self::ENCODED_LEN,
23027                __tmp.remaining(),
23028            )
23029        }
23030        __tmp.put_u8(self.target_system);
23031        __tmp.put_u8(self.target_component);
23032        for val in &self.id_or_mac {
23033            __tmp.put_u8(*val);
23034        }
23035        __tmp.put_u8(self.id_type as u8);
23036        __tmp.put_u8(self.ua_type as u8);
23037        for val in &self.uas_id {
23038            __tmp.put_u8(*val);
23039        }
23040        if matches!(version, MavlinkVersion::V2) {
23041            let len = __tmp.len();
23042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23043        } else {
23044            __tmp.len()
23045        }
23046    }
23047}
23048#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
23049#[doc = ""]
23050#[doc = "ID: 12901"]
23051#[derive(Debug, Clone, PartialEq)]
23052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23054#[cfg_attr(feature = "ts", derive(TS))]
23055#[cfg_attr(feature = "ts", ts(export))]
23056pub struct OPEN_DRONE_ID_LOCATION_DATA {
23057    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23058    pub latitude: i32,
23059    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23060    pub longitude: i32,
23061    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
23062    pub altitude_barometric: f32,
23063    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
23064    pub altitude_geodetic: f32,
23065    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
23066    pub height: f32,
23067    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
23068    pub timestamp: f32,
23069    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
23070    pub direction: u16,
23071    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
23072    pub speed_horizontal: u16,
23073    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
23074    pub speed_vertical: i16,
23075    #[doc = "System ID (0 for broadcast)."]
23076    pub target_system: u8,
23077    #[doc = "Component ID (0 for broadcast)."]
23078    pub target_component: u8,
23079    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23081    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23082    pub id_or_mac: [u8; 20],
23083    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
23084    pub status: MavOdidStatus,
23085    #[doc = "Indicates the reference point for the height field."]
23086    pub height_reference: MavOdidHeightRef,
23087    #[doc = "The accuracy of the horizontal position."]
23088    pub horizontal_accuracy: MavOdidHorAcc,
23089    #[doc = "The accuracy of the vertical position."]
23090    pub vertical_accuracy: MavOdidVerAcc,
23091    #[doc = "The accuracy of the barometric altitude."]
23092    pub barometer_accuracy: MavOdidVerAcc,
23093    #[doc = "The accuracy of the horizontal and vertical speed."]
23094    pub speed_accuracy: MavOdidSpeedAcc,
23095    #[doc = "The accuracy of the timestamps."]
23096    pub timestamp_accuracy: MavOdidTimeAcc,
23097}
23098impl OPEN_DRONE_ID_LOCATION_DATA {
23099    pub const ENCODED_LEN: usize = 59usize;
23100    pub const DEFAULT: Self = Self {
23101        latitude: 0_i32,
23102        longitude: 0_i32,
23103        altitude_barometric: 0.0_f32,
23104        altitude_geodetic: 0.0_f32,
23105        height: 0.0_f32,
23106        timestamp: 0.0_f32,
23107        direction: 0_u16,
23108        speed_horizontal: 0_u16,
23109        speed_vertical: 0_i16,
23110        target_system: 0_u8,
23111        target_component: 0_u8,
23112        id_or_mac: [0_u8; 20usize],
23113        status: MavOdidStatus::DEFAULT,
23114        height_reference: MavOdidHeightRef::DEFAULT,
23115        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
23116        vertical_accuracy: MavOdidVerAcc::DEFAULT,
23117        barometer_accuracy: MavOdidVerAcc::DEFAULT,
23118        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
23119        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
23120    };
23121    #[cfg(feature = "arbitrary")]
23122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23123        use arbitrary::{Arbitrary, Unstructured};
23124        let mut buf = [0u8; 1024];
23125        rng.fill_bytes(&mut buf);
23126        let mut unstructured = Unstructured::new(&buf);
23127        Self::arbitrary(&mut unstructured).unwrap_or_default()
23128    }
23129}
23130impl Default for OPEN_DRONE_ID_LOCATION_DATA {
23131    fn default() -> Self {
23132        Self::DEFAULT.clone()
23133    }
23134}
23135impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
23136    type Message = MavMessage;
23137    const ID: u32 = 12901u32;
23138    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
23139    const EXTRA_CRC: u8 = 254u8;
23140    const ENCODED_LEN: usize = 59usize;
23141    fn deser(
23142        _version: MavlinkVersion,
23143        __input: &[u8],
23144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23145        let avail_len = __input.len();
23146        let mut payload_buf = [0; Self::ENCODED_LEN];
23147        let mut buf = if avail_len < Self::ENCODED_LEN {
23148            payload_buf[0..avail_len].copy_from_slice(__input);
23149            Bytes::new(&payload_buf)
23150        } else {
23151            Bytes::new(__input)
23152        };
23153        let mut __struct = Self::default();
23154        __struct.latitude = buf.get_i32_le();
23155        __struct.longitude = buf.get_i32_le();
23156        __struct.altitude_barometric = buf.get_f32_le();
23157        __struct.altitude_geodetic = buf.get_f32_le();
23158        __struct.height = buf.get_f32_le();
23159        __struct.timestamp = buf.get_f32_le();
23160        __struct.direction = buf.get_u16_le();
23161        __struct.speed_horizontal = buf.get_u16_le();
23162        __struct.speed_vertical = buf.get_i16_le();
23163        __struct.target_system = buf.get_u8();
23164        __struct.target_component = buf.get_u8();
23165        for v in &mut __struct.id_or_mac {
23166            let val = buf.get_u8();
23167            *v = val;
23168        }
23169        let tmp = buf.get_u8();
23170        __struct.status =
23171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23172                enum_type: "MavOdidStatus",
23173                value: tmp as u64,
23174            })?;
23175        let tmp = buf.get_u8();
23176        __struct.height_reference =
23177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23178                enum_type: "MavOdidHeightRef",
23179                value: tmp as u64,
23180            })?;
23181        let tmp = buf.get_u8();
23182        __struct.horizontal_accuracy =
23183            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23184                enum_type: "MavOdidHorAcc",
23185                value: tmp as u64,
23186            })?;
23187        let tmp = buf.get_u8();
23188        __struct.vertical_accuracy =
23189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23190                enum_type: "MavOdidVerAcc",
23191                value: tmp as u64,
23192            })?;
23193        let tmp = buf.get_u8();
23194        __struct.barometer_accuracy =
23195            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23196                enum_type: "MavOdidVerAcc",
23197                value: tmp as u64,
23198            })?;
23199        let tmp = buf.get_u8();
23200        __struct.speed_accuracy =
23201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23202                enum_type: "MavOdidSpeedAcc",
23203                value: tmp as u64,
23204            })?;
23205        let tmp = buf.get_u8();
23206        __struct.timestamp_accuracy =
23207            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23208                enum_type: "MavOdidTimeAcc",
23209                value: tmp as u64,
23210            })?;
23211        Ok(__struct)
23212    }
23213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23214        let mut __tmp = BytesMut::new(bytes);
23215        #[allow(clippy::absurd_extreme_comparisons)]
23216        #[allow(unused_comparisons)]
23217        if __tmp.remaining() < Self::ENCODED_LEN {
23218            panic!(
23219                "buffer is too small (need {} bytes, but got {})",
23220                Self::ENCODED_LEN,
23221                __tmp.remaining(),
23222            )
23223        }
23224        __tmp.put_i32_le(self.latitude);
23225        __tmp.put_i32_le(self.longitude);
23226        __tmp.put_f32_le(self.altitude_barometric);
23227        __tmp.put_f32_le(self.altitude_geodetic);
23228        __tmp.put_f32_le(self.height);
23229        __tmp.put_f32_le(self.timestamp);
23230        __tmp.put_u16_le(self.direction);
23231        __tmp.put_u16_le(self.speed_horizontal);
23232        __tmp.put_i16_le(self.speed_vertical);
23233        __tmp.put_u8(self.target_system);
23234        __tmp.put_u8(self.target_component);
23235        for val in &self.id_or_mac {
23236            __tmp.put_u8(*val);
23237        }
23238        __tmp.put_u8(self.status as u8);
23239        __tmp.put_u8(self.height_reference as u8);
23240        __tmp.put_u8(self.horizontal_accuracy as u8);
23241        __tmp.put_u8(self.vertical_accuracy as u8);
23242        __tmp.put_u8(self.barometer_accuracy as u8);
23243        __tmp.put_u8(self.speed_accuracy as u8);
23244        __tmp.put_u8(self.timestamp_accuracy as u8);
23245        if matches!(version, MavlinkVersion::V2) {
23246            let len = __tmp.len();
23247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23248        } else {
23249            __tmp.len()
23250        }
23251    }
23252}
23253#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
23254#[doc = ""]
23255#[doc = "ID: 12915"]
23256#[derive(Debug, Clone, PartialEq)]
23257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23259#[cfg_attr(feature = "ts", derive(TS))]
23260#[cfg_attr(feature = "ts", ts(export))]
23261pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23262    #[doc = "System ID (0 for broadcast)."]
23263    pub target_system: u8,
23264    #[doc = "Component ID (0 for broadcast)."]
23265    pub target_component: u8,
23266    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23268    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23269    pub id_or_mac: [u8; 20],
23270    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
23271    pub single_message_size: u8,
23272    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
23273    pub msg_pack_size: u8,
23274    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
23275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23276    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23277    pub messages: [u8; 225],
23278}
23279impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23280    pub const ENCODED_LEN: usize = 249usize;
23281    pub const DEFAULT: Self = Self {
23282        target_system: 0_u8,
23283        target_component: 0_u8,
23284        id_or_mac: [0_u8; 20usize],
23285        single_message_size: 0_u8,
23286        msg_pack_size: 0_u8,
23287        messages: [0_u8; 225usize],
23288    };
23289    #[cfg(feature = "arbitrary")]
23290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23291        use arbitrary::{Arbitrary, Unstructured};
23292        let mut buf = [0u8; 1024];
23293        rng.fill_bytes(&mut buf);
23294        let mut unstructured = Unstructured::new(&buf);
23295        Self::arbitrary(&mut unstructured).unwrap_or_default()
23296    }
23297}
23298impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23299    fn default() -> Self {
23300        Self::DEFAULT.clone()
23301    }
23302}
23303impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23304    type Message = MavMessage;
23305    const ID: u32 = 12915u32;
23306    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23307    const EXTRA_CRC: u8 = 94u8;
23308    const ENCODED_LEN: usize = 249usize;
23309    fn deser(
23310        _version: MavlinkVersion,
23311        __input: &[u8],
23312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23313        let avail_len = __input.len();
23314        let mut payload_buf = [0; Self::ENCODED_LEN];
23315        let mut buf = if avail_len < Self::ENCODED_LEN {
23316            payload_buf[0..avail_len].copy_from_slice(__input);
23317            Bytes::new(&payload_buf)
23318        } else {
23319            Bytes::new(__input)
23320        };
23321        let mut __struct = Self::default();
23322        __struct.target_system = buf.get_u8();
23323        __struct.target_component = buf.get_u8();
23324        for v in &mut __struct.id_or_mac {
23325            let val = buf.get_u8();
23326            *v = val;
23327        }
23328        __struct.single_message_size = buf.get_u8();
23329        __struct.msg_pack_size = buf.get_u8();
23330        for v in &mut __struct.messages {
23331            let val = buf.get_u8();
23332            *v = val;
23333        }
23334        Ok(__struct)
23335    }
23336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23337        let mut __tmp = BytesMut::new(bytes);
23338        #[allow(clippy::absurd_extreme_comparisons)]
23339        #[allow(unused_comparisons)]
23340        if __tmp.remaining() < Self::ENCODED_LEN {
23341            panic!(
23342                "buffer is too small (need {} bytes, but got {})",
23343                Self::ENCODED_LEN,
23344                __tmp.remaining(),
23345            )
23346        }
23347        __tmp.put_u8(self.target_system);
23348        __tmp.put_u8(self.target_component);
23349        for val in &self.id_or_mac {
23350            __tmp.put_u8(*val);
23351        }
23352        __tmp.put_u8(self.single_message_size);
23353        __tmp.put_u8(self.msg_pack_size);
23354        for val in &self.messages {
23355            __tmp.put_u8(*val);
23356        }
23357        if matches!(version, MavlinkVersion::V2) {
23358            let len = __tmp.len();
23359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23360        } else {
23361            __tmp.len()
23362        }
23363    }
23364}
23365#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23366#[doc = ""]
23367#[doc = "ID: 12905"]
23368#[derive(Debug, Clone, PartialEq)]
23369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23371#[cfg_attr(feature = "ts", derive(TS))]
23372#[cfg_attr(feature = "ts", ts(export))]
23373pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23374    #[doc = "System ID (0 for broadcast)."]
23375    pub target_system: u8,
23376    #[doc = "Component ID (0 for broadcast)."]
23377    pub target_component: u8,
23378    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23380    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23381    pub id_or_mac: [u8; 20],
23382    #[doc = "Indicates the type of the operator_id field."]
23383    pub operator_id_type: MavOdidOperatorIdType,
23384    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23385    #[cfg_attr(feature = "ts", ts(type = "string"))]
23386    pub operator_id: CharArray<20>,
23387}
23388impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23389    pub const ENCODED_LEN: usize = 43usize;
23390    pub const DEFAULT: Self = Self {
23391        target_system: 0_u8,
23392        target_component: 0_u8,
23393        id_or_mac: [0_u8; 20usize],
23394        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23395        operator_id: CharArray::new([0_u8; 20usize]),
23396    };
23397    #[cfg(feature = "arbitrary")]
23398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23399        use arbitrary::{Arbitrary, Unstructured};
23400        let mut buf = [0u8; 1024];
23401        rng.fill_bytes(&mut buf);
23402        let mut unstructured = Unstructured::new(&buf);
23403        Self::arbitrary(&mut unstructured).unwrap_or_default()
23404    }
23405}
23406impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23407    fn default() -> Self {
23408        Self::DEFAULT.clone()
23409    }
23410}
23411impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23412    type Message = MavMessage;
23413    const ID: u32 = 12905u32;
23414    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23415    const EXTRA_CRC: u8 = 49u8;
23416    const ENCODED_LEN: usize = 43usize;
23417    fn deser(
23418        _version: MavlinkVersion,
23419        __input: &[u8],
23420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23421        let avail_len = __input.len();
23422        let mut payload_buf = [0; Self::ENCODED_LEN];
23423        let mut buf = if avail_len < Self::ENCODED_LEN {
23424            payload_buf[0..avail_len].copy_from_slice(__input);
23425            Bytes::new(&payload_buf)
23426        } else {
23427            Bytes::new(__input)
23428        };
23429        let mut __struct = Self::default();
23430        __struct.target_system = buf.get_u8();
23431        __struct.target_component = buf.get_u8();
23432        for v in &mut __struct.id_or_mac {
23433            let val = buf.get_u8();
23434            *v = val;
23435        }
23436        let tmp = buf.get_u8();
23437        __struct.operator_id_type =
23438            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23439                enum_type: "MavOdidOperatorIdType",
23440                value: tmp as u64,
23441            })?;
23442        let mut tmp = [0_u8; 20usize];
23443        for v in &mut tmp {
23444            *v = buf.get_u8();
23445        }
23446        __struct.operator_id = CharArray::new(tmp);
23447        Ok(__struct)
23448    }
23449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23450        let mut __tmp = BytesMut::new(bytes);
23451        #[allow(clippy::absurd_extreme_comparisons)]
23452        #[allow(unused_comparisons)]
23453        if __tmp.remaining() < Self::ENCODED_LEN {
23454            panic!(
23455                "buffer is too small (need {} bytes, but got {})",
23456                Self::ENCODED_LEN,
23457                __tmp.remaining(),
23458            )
23459        }
23460        __tmp.put_u8(self.target_system);
23461        __tmp.put_u8(self.target_component);
23462        for val in &self.id_or_mac {
23463            __tmp.put_u8(*val);
23464        }
23465        __tmp.put_u8(self.operator_id_type as u8);
23466        for val in &self.operator_id {
23467            __tmp.put_u8(*val);
23468        }
23469        if matches!(version, MavlinkVersion::V2) {
23470            let len = __tmp.len();
23471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23472        } else {
23473            __tmp.len()
23474        }
23475    }
23476}
23477#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23478#[doc = ""]
23479#[doc = "ID: 12903"]
23480#[derive(Debug, Clone, PartialEq)]
23481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23483#[cfg_attr(feature = "ts", derive(TS))]
23484#[cfg_attr(feature = "ts", ts(export))]
23485pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23486    #[doc = "System ID (0 for broadcast)."]
23487    pub target_system: u8,
23488    #[doc = "Component ID (0 for broadcast)."]
23489    pub target_component: u8,
23490    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23493    pub id_or_mac: [u8; 20],
23494    #[doc = "Indicates the type of the description field."]
23495    pub description_type: MavOdidDescType,
23496    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23497    #[cfg_attr(feature = "ts", ts(type = "string"))]
23498    pub description: CharArray<23>,
23499}
23500impl OPEN_DRONE_ID_SELF_ID_DATA {
23501    pub const ENCODED_LEN: usize = 46usize;
23502    pub const DEFAULT: Self = Self {
23503        target_system: 0_u8,
23504        target_component: 0_u8,
23505        id_or_mac: [0_u8; 20usize],
23506        description_type: MavOdidDescType::DEFAULT,
23507        description: CharArray::new([0_u8; 23usize]),
23508    };
23509    #[cfg(feature = "arbitrary")]
23510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23511        use arbitrary::{Arbitrary, Unstructured};
23512        let mut buf = [0u8; 1024];
23513        rng.fill_bytes(&mut buf);
23514        let mut unstructured = Unstructured::new(&buf);
23515        Self::arbitrary(&mut unstructured).unwrap_or_default()
23516    }
23517}
23518impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23519    fn default() -> Self {
23520        Self::DEFAULT.clone()
23521    }
23522}
23523impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23524    type Message = MavMessage;
23525    const ID: u32 = 12903u32;
23526    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23527    const EXTRA_CRC: u8 = 249u8;
23528    const ENCODED_LEN: usize = 46usize;
23529    fn deser(
23530        _version: MavlinkVersion,
23531        __input: &[u8],
23532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23533        let avail_len = __input.len();
23534        let mut payload_buf = [0; Self::ENCODED_LEN];
23535        let mut buf = if avail_len < Self::ENCODED_LEN {
23536            payload_buf[0..avail_len].copy_from_slice(__input);
23537            Bytes::new(&payload_buf)
23538        } else {
23539            Bytes::new(__input)
23540        };
23541        let mut __struct = Self::default();
23542        __struct.target_system = buf.get_u8();
23543        __struct.target_component = buf.get_u8();
23544        for v in &mut __struct.id_or_mac {
23545            let val = buf.get_u8();
23546            *v = val;
23547        }
23548        let tmp = buf.get_u8();
23549        __struct.description_type =
23550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23551                enum_type: "MavOdidDescType",
23552                value: tmp as u64,
23553            })?;
23554        let mut tmp = [0_u8; 23usize];
23555        for v in &mut tmp {
23556            *v = buf.get_u8();
23557        }
23558        __struct.description = CharArray::new(tmp);
23559        Ok(__struct)
23560    }
23561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23562        let mut __tmp = BytesMut::new(bytes);
23563        #[allow(clippy::absurd_extreme_comparisons)]
23564        #[allow(unused_comparisons)]
23565        if __tmp.remaining() < Self::ENCODED_LEN {
23566            panic!(
23567                "buffer is too small (need {} bytes, but got {})",
23568                Self::ENCODED_LEN,
23569                __tmp.remaining(),
23570            )
23571        }
23572        __tmp.put_u8(self.target_system);
23573        __tmp.put_u8(self.target_component);
23574        for val in &self.id_or_mac {
23575            __tmp.put_u8(*val);
23576        }
23577        __tmp.put_u8(self.description_type as u8);
23578        for val in &self.description {
23579            __tmp.put_u8(*val);
23580        }
23581        if matches!(version, MavlinkVersion::V2) {
23582            let len = __tmp.len();
23583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23584        } else {
23585            __tmp.len()
23586        }
23587    }
23588}
23589#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23590#[doc = ""]
23591#[doc = "ID: 12904"]
23592#[derive(Debug, Clone, PartialEq)]
23593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23595#[cfg_attr(feature = "ts", derive(TS))]
23596#[cfg_attr(feature = "ts", ts(export))]
23597pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23598    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23599    pub operator_latitude: i32,
23600    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23601    pub operator_longitude: i32,
23602    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23603    pub area_ceiling: f32,
23604    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23605    pub area_floor: f32,
23606    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23607    pub operator_altitude_geo: f32,
23608    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23609    pub timestamp: u32,
23610    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23611    pub area_count: u16,
23612    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23613    pub area_radius: u16,
23614    #[doc = "System ID (0 for broadcast)."]
23615    pub target_system: u8,
23616    #[doc = "Component ID (0 for broadcast)."]
23617    pub target_component: u8,
23618    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23619    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23620    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23621    pub id_or_mac: [u8; 20],
23622    #[doc = "Specifies the operator location type."]
23623    pub operator_location_type: MavOdidOperatorLocationType,
23624    #[doc = "Specifies the classification type of the UA."]
23625    pub classification_type: MavOdidClassificationType,
23626    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23627    pub category_eu: MavOdidCategoryEu,
23628    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23629    pub class_eu: MavOdidClassEu,
23630}
23631impl OPEN_DRONE_ID_SYSTEM_DATA {
23632    pub const ENCODED_LEN: usize = 54usize;
23633    pub const DEFAULT: Self = Self {
23634        operator_latitude: 0_i32,
23635        operator_longitude: 0_i32,
23636        area_ceiling: 0.0_f32,
23637        area_floor: 0.0_f32,
23638        operator_altitude_geo: 0.0_f32,
23639        timestamp: 0_u32,
23640        area_count: 0_u16,
23641        area_radius: 0_u16,
23642        target_system: 0_u8,
23643        target_component: 0_u8,
23644        id_or_mac: [0_u8; 20usize],
23645        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23646        classification_type: MavOdidClassificationType::DEFAULT,
23647        category_eu: MavOdidCategoryEu::DEFAULT,
23648        class_eu: MavOdidClassEu::DEFAULT,
23649    };
23650    #[cfg(feature = "arbitrary")]
23651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23652        use arbitrary::{Arbitrary, Unstructured};
23653        let mut buf = [0u8; 1024];
23654        rng.fill_bytes(&mut buf);
23655        let mut unstructured = Unstructured::new(&buf);
23656        Self::arbitrary(&mut unstructured).unwrap_or_default()
23657    }
23658}
23659impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23660    fn default() -> Self {
23661        Self::DEFAULT.clone()
23662    }
23663}
23664impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23665    type Message = MavMessage;
23666    const ID: u32 = 12904u32;
23667    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23668    const EXTRA_CRC: u8 = 77u8;
23669    const ENCODED_LEN: usize = 54usize;
23670    fn deser(
23671        _version: MavlinkVersion,
23672        __input: &[u8],
23673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23674        let avail_len = __input.len();
23675        let mut payload_buf = [0; Self::ENCODED_LEN];
23676        let mut buf = if avail_len < Self::ENCODED_LEN {
23677            payload_buf[0..avail_len].copy_from_slice(__input);
23678            Bytes::new(&payload_buf)
23679        } else {
23680            Bytes::new(__input)
23681        };
23682        let mut __struct = Self::default();
23683        __struct.operator_latitude = buf.get_i32_le();
23684        __struct.operator_longitude = buf.get_i32_le();
23685        __struct.area_ceiling = buf.get_f32_le();
23686        __struct.area_floor = buf.get_f32_le();
23687        __struct.operator_altitude_geo = buf.get_f32_le();
23688        __struct.timestamp = buf.get_u32_le();
23689        __struct.area_count = buf.get_u16_le();
23690        __struct.area_radius = buf.get_u16_le();
23691        __struct.target_system = buf.get_u8();
23692        __struct.target_component = buf.get_u8();
23693        for v in &mut __struct.id_or_mac {
23694            let val = buf.get_u8();
23695            *v = val;
23696        }
23697        let tmp = buf.get_u8();
23698        __struct.operator_location_type =
23699            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23700                enum_type: "MavOdidOperatorLocationType",
23701                value: tmp as u64,
23702            })?;
23703        let tmp = buf.get_u8();
23704        __struct.classification_type =
23705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23706                enum_type: "MavOdidClassificationType",
23707                value: tmp as u64,
23708            })?;
23709        let tmp = buf.get_u8();
23710        __struct.category_eu =
23711            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23712                enum_type: "MavOdidCategoryEu",
23713                value: tmp as u64,
23714            })?;
23715        let tmp = buf.get_u8();
23716        __struct.class_eu =
23717            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23718                enum_type: "MavOdidClassEu",
23719                value: tmp as u64,
23720            })?;
23721        Ok(__struct)
23722    }
23723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23724        let mut __tmp = BytesMut::new(bytes);
23725        #[allow(clippy::absurd_extreme_comparisons)]
23726        #[allow(unused_comparisons)]
23727        if __tmp.remaining() < Self::ENCODED_LEN {
23728            panic!(
23729                "buffer is too small (need {} bytes, but got {})",
23730                Self::ENCODED_LEN,
23731                __tmp.remaining(),
23732            )
23733        }
23734        __tmp.put_i32_le(self.operator_latitude);
23735        __tmp.put_i32_le(self.operator_longitude);
23736        __tmp.put_f32_le(self.area_ceiling);
23737        __tmp.put_f32_le(self.area_floor);
23738        __tmp.put_f32_le(self.operator_altitude_geo);
23739        __tmp.put_u32_le(self.timestamp);
23740        __tmp.put_u16_le(self.area_count);
23741        __tmp.put_u16_le(self.area_radius);
23742        __tmp.put_u8(self.target_system);
23743        __tmp.put_u8(self.target_component);
23744        for val in &self.id_or_mac {
23745            __tmp.put_u8(*val);
23746        }
23747        __tmp.put_u8(self.operator_location_type as u8);
23748        __tmp.put_u8(self.classification_type as u8);
23749        __tmp.put_u8(self.category_eu as u8);
23750        __tmp.put_u8(self.class_eu as u8);
23751        if matches!(version, MavlinkVersion::V2) {
23752            let len = __tmp.len();
23753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23754        } else {
23755            __tmp.len()
23756        }
23757    }
23758}
23759#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23760#[doc = ""]
23761#[doc = "ID: 12919"]
23762#[derive(Debug, Clone, PartialEq)]
23763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23765#[cfg_attr(feature = "ts", derive(TS))]
23766#[cfg_attr(feature = "ts", ts(export))]
23767pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23768    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23769    pub operator_latitude: i32,
23770    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23771    pub operator_longitude: i32,
23772    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23773    pub operator_altitude_geo: f32,
23774    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23775    pub timestamp: u32,
23776    #[doc = "System ID (0 for broadcast)."]
23777    pub target_system: u8,
23778    #[doc = "Component ID (0 for broadcast)."]
23779    pub target_component: u8,
23780}
23781impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23782    pub const ENCODED_LEN: usize = 18usize;
23783    pub const DEFAULT: Self = Self {
23784        operator_latitude: 0_i32,
23785        operator_longitude: 0_i32,
23786        operator_altitude_geo: 0.0_f32,
23787        timestamp: 0_u32,
23788        target_system: 0_u8,
23789        target_component: 0_u8,
23790    };
23791    #[cfg(feature = "arbitrary")]
23792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23793        use arbitrary::{Arbitrary, Unstructured};
23794        let mut buf = [0u8; 1024];
23795        rng.fill_bytes(&mut buf);
23796        let mut unstructured = Unstructured::new(&buf);
23797        Self::arbitrary(&mut unstructured).unwrap_or_default()
23798    }
23799}
23800impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23801    fn default() -> Self {
23802        Self::DEFAULT.clone()
23803    }
23804}
23805impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23806    type Message = MavMessage;
23807    const ID: u32 = 12919u32;
23808    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23809    const EXTRA_CRC: u8 = 7u8;
23810    const ENCODED_LEN: usize = 18usize;
23811    fn deser(
23812        _version: MavlinkVersion,
23813        __input: &[u8],
23814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23815        let avail_len = __input.len();
23816        let mut payload_buf = [0; Self::ENCODED_LEN];
23817        let mut buf = if avail_len < Self::ENCODED_LEN {
23818            payload_buf[0..avail_len].copy_from_slice(__input);
23819            Bytes::new(&payload_buf)
23820        } else {
23821            Bytes::new(__input)
23822        };
23823        let mut __struct = Self::default();
23824        __struct.operator_latitude = buf.get_i32_le();
23825        __struct.operator_longitude = buf.get_i32_le();
23826        __struct.operator_altitude_geo = buf.get_f32_le();
23827        __struct.timestamp = buf.get_u32_le();
23828        __struct.target_system = buf.get_u8();
23829        __struct.target_component = buf.get_u8();
23830        Ok(__struct)
23831    }
23832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23833        let mut __tmp = BytesMut::new(bytes);
23834        #[allow(clippy::absurd_extreme_comparisons)]
23835        #[allow(unused_comparisons)]
23836        if __tmp.remaining() < Self::ENCODED_LEN {
23837            panic!(
23838                "buffer is too small (need {} bytes, but got {})",
23839                Self::ENCODED_LEN,
23840                __tmp.remaining(),
23841            )
23842        }
23843        __tmp.put_i32_le(self.operator_latitude);
23844        __tmp.put_i32_le(self.operator_longitude);
23845        __tmp.put_f32_le(self.operator_altitude_geo);
23846        __tmp.put_u32_le(self.timestamp);
23847        __tmp.put_u8(self.target_system);
23848        __tmp.put_u8(self.target_component);
23849        if matches!(version, MavlinkVersion::V2) {
23850            let len = __tmp.len();
23851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23852        } else {
23853            __tmp.len()
23854        }
23855    }
23856}
23857#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23858#[doc = ""]
23859#[doc = "ID: 100"]
23860#[derive(Debug, Clone, PartialEq)]
23861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23863#[cfg_attr(feature = "ts", derive(TS))]
23864#[cfg_attr(feature = "ts", ts(export))]
23865pub struct OPTICAL_FLOW_DATA {
23866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23867    pub time_usec: u64,
23868    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23869    pub flow_comp_m_x: f32,
23870    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23871    pub flow_comp_m_y: f32,
23872    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23873    pub ground_distance: f32,
23874    #[doc = "Flow in x-sensor direction"]
23875    pub flow_x: i16,
23876    #[doc = "Flow in y-sensor direction"]
23877    pub flow_y: i16,
23878    #[doc = "Sensor ID"]
23879    pub sensor_id: u8,
23880    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23881    pub quality: u8,
23882    #[doc = "Flow rate about X axis"]
23883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23884    pub flow_rate_x: f32,
23885    #[doc = "Flow rate about Y axis"]
23886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23887    pub flow_rate_y: f32,
23888}
23889impl OPTICAL_FLOW_DATA {
23890    pub const ENCODED_LEN: usize = 34usize;
23891    pub const DEFAULT: Self = Self {
23892        time_usec: 0_u64,
23893        flow_comp_m_x: 0.0_f32,
23894        flow_comp_m_y: 0.0_f32,
23895        ground_distance: 0.0_f32,
23896        flow_x: 0_i16,
23897        flow_y: 0_i16,
23898        sensor_id: 0_u8,
23899        quality: 0_u8,
23900        flow_rate_x: 0.0_f32,
23901        flow_rate_y: 0.0_f32,
23902    };
23903    #[cfg(feature = "arbitrary")]
23904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23905        use arbitrary::{Arbitrary, Unstructured};
23906        let mut buf = [0u8; 1024];
23907        rng.fill_bytes(&mut buf);
23908        let mut unstructured = Unstructured::new(&buf);
23909        Self::arbitrary(&mut unstructured).unwrap_or_default()
23910    }
23911}
23912impl Default for OPTICAL_FLOW_DATA {
23913    fn default() -> Self {
23914        Self::DEFAULT.clone()
23915    }
23916}
23917impl MessageData for OPTICAL_FLOW_DATA {
23918    type Message = MavMessage;
23919    const ID: u32 = 100u32;
23920    const NAME: &'static str = "OPTICAL_FLOW";
23921    const EXTRA_CRC: u8 = 175u8;
23922    const ENCODED_LEN: usize = 34usize;
23923    fn deser(
23924        _version: MavlinkVersion,
23925        __input: &[u8],
23926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23927        let avail_len = __input.len();
23928        let mut payload_buf = [0; Self::ENCODED_LEN];
23929        let mut buf = if avail_len < Self::ENCODED_LEN {
23930            payload_buf[0..avail_len].copy_from_slice(__input);
23931            Bytes::new(&payload_buf)
23932        } else {
23933            Bytes::new(__input)
23934        };
23935        let mut __struct = Self::default();
23936        __struct.time_usec = buf.get_u64_le();
23937        __struct.flow_comp_m_x = buf.get_f32_le();
23938        __struct.flow_comp_m_y = buf.get_f32_le();
23939        __struct.ground_distance = buf.get_f32_le();
23940        __struct.flow_x = buf.get_i16_le();
23941        __struct.flow_y = buf.get_i16_le();
23942        __struct.sensor_id = buf.get_u8();
23943        __struct.quality = buf.get_u8();
23944        __struct.flow_rate_x = buf.get_f32_le();
23945        __struct.flow_rate_y = buf.get_f32_le();
23946        Ok(__struct)
23947    }
23948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23949        let mut __tmp = BytesMut::new(bytes);
23950        #[allow(clippy::absurd_extreme_comparisons)]
23951        #[allow(unused_comparisons)]
23952        if __tmp.remaining() < Self::ENCODED_LEN {
23953            panic!(
23954                "buffer is too small (need {} bytes, but got {})",
23955                Self::ENCODED_LEN,
23956                __tmp.remaining(),
23957            )
23958        }
23959        __tmp.put_u64_le(self.time_usec);
23960        __tmp.put_f32_le(self.flow_comp_m_x);
23961        __tmp.put_f32_le(self.flow_comp_m_y);
23962        __tmp.put_f32_le(self.ground_distance);
23963        __tmp.put_i16_le(self.flow_x);
23964        __tmp.put_i16_le(self.flow_y);
23965        __tmp.put_u8(self.sensor_id);
23966        __tmp.put_u8(self.quality);
23967        if matches!(version, MavlinkVersion::V2) {
23968            __tmp.put_f32_le(self.flow_rate_x);
23969            __tmp.put_f32_le(self.flow_rate_y);
23970            let len = __tmp.len();
23971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23972        } else {
23973            __tmp.len()
23974        }
23975    }
23976}
23977#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23978#[doc = ""]
23979#[doc = "ID: 106"]
23980#[derive(Debug, Clone, PartialEq)]
23981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23983#[cfg_attr(feature = "ts", derive(TS))]
23984#[cfg_attr(feature = "ts", ts(export))]
23985pub struct OPTICAL_FLOW_RAD_DATA {
23986    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23987    pub time_usec: u64,
23988    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23989    pub integration_time_us: u32,
23990    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23991    pub integrated_x: f32,
23992    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23993    pub integrated_y: f32,
23994    #[doc = "RH rotation around X axis"]
23995    pub integrated_xgyro: f32,
23996    #[doc = "RH rotation around Y axis"]
23997    pub integrated_ygyro: f32,
23998    #[doc = "RH rotation around Z axis"]
23999    pub integrated_zgyro: f32,
24000    #[doc = "Time since the distance was sampled."]
24001    pub time_delta_distance_us: u32,
24002    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
24003    pub distance: f32,
24004    #[doc = "Temperature"]
24005    pub temperature: i16,
24006    #[doc = "Sensor ID"]
24007    pub sensor_id: u8,
24008    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
24009    pub quality: u8,
24010}
24011impl OPTICAL_FLOW_RAD_DATA {
24012    pub const ENCODED_LEN: usize = 44usize;
24013    pub const DEFAULT: Self = Self {
24014        time_usec: 0_u64,
24015        integration_time_us: 0_u32,
24016        integrated_x: 0.0_f32,
24017        integrated_y: 0.0_f32,
24018        integrated_xgyro: 0.0_f32,
24019        integrated_ygyro: 0.0_f32,
24020        integrated_zgyro: 0.0_f32,
24021        time_delta_distance_us: 0_u32,
24022        distance: 0.0_f32,
24023        temperature: 0_i16,
24024        sensor_id: 0_u8,
24025        quality: 0_u8,
24026    };
24027    #[cfg(feature = "arbitrary")]
24028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24029        use arbitrary::{Arbitrary, Unstructured};
24030        let mut buf = [0u8; 1024];
24031        rng.fill_bytes(&mut buf);
24032        let mut unstructured = Unstructured::new(&buf);
24033        Self::arbitrary(&mut unstructured).unwrap_or_default()
24034    }
24035}
24036impl Default for OPTICAL_FLOW_RAD_DATA {
24037    fn default() -> Self {
24038        Self::DEFAULT.clone()
24039    }
24040}
24041impl MessageData for OPTICAL_FLOW_RAD_DATA {
24042    type Message = MavMessage;
24043    const ID: u32 = 106u32;
24044    const NAME: &'static str = "OPTICAL_FLOW_RAD";
24045    const EXTRA_CRC: u8 = 138u8;
24046    const ENCODED_LEN: usize = 44usize;
24047    fn deser(
24048        _version: MavlinkVersion,
24049        __input: &[u8],
24050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24051        let avail_len = __input.len();
24052        let mut payload_buf = [0; Self::ENCODED_LEN];
24053        let mut buf = if avail_len < Self::ENCODED_LEN {
24054            payload_buf[0..avail_len].copy_from_slice(__input);
24055            Bytes::new(&payload_buf)
24056        } else {
24057            Bytes::new(__input)
24058        };
24059        let mut __struct = Self::default();
24060        __struct.time_usec = buf.get_u64_le();
24061        __struct.integration_time_us = buf.get_u32_le();
24062        __struct.integrated_x = buf.get_f32_le();
24063        __struct.integrated_y = buf.get_f32_le();
24064        __struct.integrated_xgyro = buf.get_f32_le();
24065        __struct.integrated_ygyro = buf.get_f32_le();
24066        __struct.integrated_zgyro = buf.get_f32_le();
24067        __struct.time_delta_distance_us = buf.get_u32_le();
24068        __struct.distance = buf.get_f32_le();
24069        __struct.temperature = buf.get_i16_le();
24070        __struct.sensor_id = buf.get_u8();
24071        __struct.quality = buf.get_u8();
24072        Ok(__struct)
24073    }
24074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24075        let mut __tmp = BytesMut::new(bytes);
24076        #[allow(clippy::absurd_extreme_comparisons)]
24077        #[allow(unused_comparisons)]
24078        if __tmp.remaining() < Self::ENCODED_LEN {
24079            panic!(
24080                "buffer is too small (need {} bytes, but got {})",
24081                Self::ENCODED_LEN,
24082                __tmp.remaining(),
24083            )
24084        }
24085        __tmp.put_u64_le(self.time_usec);
24086        __tmp.put_u32_le(self.integration_time_us);
24087        __tmp.put_f32_le(self.integrated_x);
24088        __tmp.put_f32_le(self.integrated_y);
24089        __tmp.put_f32_le(self.integrated_xgyro);
24090        __tmp.put_f32_le(self.integrated_ygyro);
24091        __tmp.put_f32_le(self.integrated_zgyro);
24092        __tmp.put_u32_le(self.time_delta_distance_us);
24093        __tmp.put_f32_le(self.distance);
24094        __tmp.put_i16_le(self.temperature);
24095        __tmp.put_u8(self.sensor_id);
24096        __tmp.put_u8(self.quality);
24097        if matches!(version, MavlinkVersion::V2) {
24098            let len = __tmp.len();
24099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24100        } else {
24101            __tmp.len()
24102        }
24103    }
24104}
24105#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
24106#[doc = ""]
24107#[doc = "ID: 360"]
24108#[derive(Debug, Clone, PartialEq)]
24109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24111#[cfg_attr(feature = "ts", derive(TS))]
24112#[cfg_attr(feature = "ts", ts(export))]
24113pub struct ORBIT_EXECUTION_STATUS_DATA {
24114    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24115    pub time_usec: u64,
24116    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
24117    pub radius: f32,
24118    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24119    pub x: i32,
24120    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24121    pub y: i32,
24122    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
24123    pub z: f32,
24124    #[doc = "The coordinate system of the fields: x, y, z."]
24125    pub frame: MavFrame,
24126}
24127impl ORBIT_EXECUTION_STATUS_DATA {
24128    pub const ENCODED_LEN: usize = 25usize;
24129    pub const DEFAULT: Self = Self {
24130        time_usec: 0_u64,
24131        radius: 0.0_f32,
24132        x: 0_i32,
24133        y: 0_i32,
24134        z: 0.0_f32,
24135        frame: MavFrame::DEFAULT,
24136    };
24137    #[cfg(feature = "arbitrary")]
24138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24139        use arbitrary::{Arbitrary, Unstructured};
24140        let mut buf = [0u8; 1024];
24141        rng.fill_bytes(&mut buf);
24142        let mut unstructured = Unstructured::new(&buf);
24143        Self::arbitrary(&mut unstructured).unwrap_or_default()
24144    }
24145}
24146impl Default for ORBIT_EXECUTION_STATUS_DATA {
24147    fn default() -> Self {
24148        Self::DEFAULT.clone()
24149    }
24150}
24151impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
24152    type Message = MavMessage;
24153    const ID: u32 = 360u32;
24154    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
24155    const EXTRA_CRC: u8 = 11u8;
24156    const ENCODED_LEN: usize = 25usize;
24157    fn deser(
24158        _version: MavlinkVersion,
24159        __input: &[u8],
24160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24161        let avail_len = __input.len();
24162        let mut payload_buf = [0; Self::ENCODED_LEN];
24163        let mut buf = if avail_len < Self::ENCODED_LEN {
24164            payload_buf[0..avail_len].copy_from_slice(__input);
24165            Bytes::new(&payload_buf)
24166        } else {
24167            Bytes::new(__input)
24168        };
24169        let mut __struct = Self::default();
24170        __struct.time_usec = buf.get_u64_le();
24171        __struct.radius = buf.get_f32_le();
24172        __struct.x = buf.get_i32_le();
24173        __struct.y = buf.get_i32_le();
24174        __struct.z = buf.get_f32_le();
24175        let tmp = buf.get_u8();
24176        __struct.frame =
24177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24178                enum_type: "MavFrame",
24179                value: tmp as u64,
24180            })?;
24181        Ok(__struct)
24182    }
24183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24184        let mut __tmp = BytesMut::new(bytes);
24185        #[allow(clippy::absurd_extreme_comparisons)]
24186        #[allow(unused_comparisons)]
24187        if __tmp.remaining() < Self::ENCODED_LEN {
24188            panic!(
24189                "buffer is too small (need {} bytes, but got {})",
24190                Self::ENCODED_LEN,
24191                __tmp.remaining(),
24192            )
24193        }
24194        __tmp.put_u64_le(self.time_usec);
24195        __tmp.put_f32_le(self.radius);
24196        __tmp.put_i32_le(self.x);
24197        __tmp.put_i32_le(self.y);
24198        __tmp.put_f32_le(self.z);
24199        __tmp.put_u8(self.frame as u8);
24200        if matches!(version, MavlinkVersion::V2) {
24201            let len = __tmp.len();
24202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24203        } else {
24204            __tmp.len()
24205        }
24206    }
24207}
24208#[doc = "Response from a PARAM_EXT_SET message."]
24209#[doc = ""]
24210#[doc = "ID: 324"]
24211#[derive(Debug, Clone, PartialEq)]
24212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24214#[cfg_attr(feature = "ts", derive(TS))]
24215#[cfg_attr(feature = "ts", ts(export))]
24216pub struct PARAM_EXT_ACK_DATA {
24217    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24218    #[cfg_attr(feature = "ts", ts(type = "string"))]
24219    pub param_id: CharArray<16>,
24220    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
24221    #[cfg_attr(feature = "ts", ts(type = "string"))]
24222    pub param_value: CharArray<128>,
24223    #[doc = "Parameter type."]
24224    pub param_type: MavParamExtType,
24225    #[doc = "Result code."]
24226    pub param_result: ParamAck,
24227}
24228impl PARAM_EXT_ACK_DATA {
24229    pub const ENCODED_LEN: usize = 146usize;
24230    pub const DEFAULT: Self = Self {
24231        param_id: CharArray::new([0_u8; 16usize]),
24232        param_value: CharArray::new([0_u8; 128usize]),
24233        param_type: MavParamExtType::DEFAULT,
24234        param_result: ParamAck::DEFAULT,
24235    };
24236    #[cfg(feature = "arbitrary")]
24237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24238        use arbitrary::{Arbitrary, Unstructured};
24239        let mut buf = [0u8; 1024];
24240        rng.fill_bytes(&mut buf);
24241        let mut unstructured = Unstructured::new(&buf);
24242        Self::arbitrary(&mut unstructured).unwrap_or_default()
24243    }
24244}
24245impl Default for PARAM_EXT_ACK_DATA {
24246    fn default() -> Self {
24247        Self::DEFAULT.clone()
24248    }
24249}
24250impl MessageData for PARAM_EXT_ACK_DATA {
24251    type Message = MavMessage;
24252    const ID: u32 = 324u32;
24253    const NAME: &'static str = "PARAM_EXT_ACK";
24254    const EXTRA_CRC: u8 = 132u8;
24255    const ENCODED_LEN: usize = 146usize;
24256    fn deser(
24257        _version: MavlinkVersion,
24258        __input: &[u8],
24259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24260        let avail_len = __input.len();
24261        let mut payload_buf = [0; Self::ENCODED_LEN];
24262        let mut buf = if avail_len < Self::ENCODED_LEN {
24263            payload_buf[0..avail_len].copy_from_slice(__input);
24264            Bytes::new(&payload_buf)
24265        } else {
24266            Bytes::new(__input)
24267        };
24268        let mut __struct = Self::default();
24269        let mut tmp = [0_u8; 16usize];
24270        for v in &mut tmp {
24271            *v = buf.get_u8();
24272        }
24273        __struct.param_id = CharArray::new(tmp);
24274        let mut tmp = [0_u8; 128usize];
24275        for v in &mut tmp {
24276            *v = buf.get_u8();
24277        }
24278        __struct.param_value = CharArray::new(tmp);
24279        let tmp = buf.get_u8();
24280        __struct.param_type =
24281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24282                enum_type: "MavParamExtType",
24283                value: tmp as u64,
24284            })?;
24285        let tmp = buf.get_u8();
24286        __struct.param_result =
24287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24288                enum_type: "ParamAck",
24289                value: tmp as u64,
24290            })?;
24291        Ok(__struct)
24292    }
24293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24294        let mut __tmp = BytesMut::new(bytes);
24295        #[allow(clippy::absurd_extreme_comparisons)]
24296        #[allow(unused_comparisons)]
24297        if __tmp.remaining() < Self::ENCODED_LEN {
24298            panic!(
24299                "buffer is too small (need {} bytes, but got {})",
24300                Self::ENCODED_LEN,
24301                __tmp.remaining(),
24302            )
24303        }
24304        for val in &self.param_id {
24305            __tmp.put_u8(*val);
24306        }
24307        for val in &self.param_value {
24308            __tmp.put_u8(*val);
24309        }
24310        __tmp.put_u8(self.param_type as u8);
24311        __tmp.put_u8(self.param_result as u8);
24312        if matches!(version, MavlinkVersion::V2) {
24313            let len = __tmp.len();
24314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24315        } else {
24316            __tmp.len()
24317        }
24318    }
24319}
24320#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24321#[doc = ""]
24322#[doc = "ID: 321"]
24323#[derive(Debug, Clone, PartialEq)]
24324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24326#[cfg_attr(feature = "ts", derive(TS))]
24327#[cfg_attr(feature = "ts", ts(export))]
24328pub struct PARAM_EXT_REQUEST_LIST_DATA {
24329    #[doc = "System ID"]
24330    pub target_system: u8,
24331    #[doc = "Component ID"]
24332    pub target_component: u8,
24333}
24334impl PARAM_EXT_REQUEST_LIST_DATA {
24335    pub const ENCODED_LEN: usize = 2usize;
24336    pub const DEFAULT: Self = Self {
24337        target_system: 0_u8,
24338        target_component: 0_u8,
24339    };
24340    #[cfg(feature = "arbitrary")]
24341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24342        use arbitrary::{Arbitrary, Unstructured};
24343        let mut buf = [0u8; 1024];
24344        rng.fill_bytes(&mut buf);
24345        let mut unstructured = Unstructured::new(&buf);
24346        Self::arbitrary(&mut unstructured).unwrap_or_default()
24347    }
24348}
24349impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24350    fn default() -> Self {
24351        Self::DEFAULT.clone()
24352    }
24353}
24354impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24355    type Message = MavMessage;
24356    const ID: u32 = 321u32;
24357    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24358    const EXTRA_CRC: u8 = 88u8;
24359    const ENCODED_LEN: usize = 2usize;
24360    fn deser(
24361        _version: MavlinkVersion,
24362        __input: &[u8],
24363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24364        let avail_len = __input.len();
24365        let mut payload_buf = [0; Self::ENCODED_LEN];
24366        let mut buf = if avail_len < Self::ENCODED_LEN {
24367            payload_buf[0..avail_len].copy_from_slice(__input);
24368            Bytes::new(&payload_buf)
24369        } else {
24370            Bytes::new(__input)
24371        };
24372        let mut __struct = Self::default();
24373        __struct.target_system = buf.get_u8();
24374        __struct.target_component = buf.get_u8();
24375        Ok(__struct)
24376    }
24377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24378        let mut __tmp = BytesMut::new(bytes);
24379        #[allow(clippy::absurd_extreme_comparisons)]
24380        #[allow(unused_comparisons)]
24381        if __tmp.remaining() < Self::ENCODED_LEN {
24382            panic!(
24383                "buffer is too small (need {} bytes, but got {})",
24384                Self::ENCODED_LEN,
24385                __tmp.remaining(),
24386            )
24387        }
24388        __tmp.put_u8(self.target_system);
24389        __tmp.put_u8(self.target_component);
24390        if matches!(version, MavlinkVersion::V2) {
24391            let len = __tmp.len();
24392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24393        } else {
24394            __tmp.len()
24395        }
24396    }
24397}
24398#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24399#[doc = ""]
24400#[doc = "ID: 320"]
24401#[derive(Debug, Clone, PartialEq)]
24402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24404#[cfg_attr(feature = "ts", derive(TS))]
24405#[cfg_attr(feature = "ts", ts(export))]
24406pub struct PARAM_EXT_REQUEST_READ_DATA {
24407    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24408    pub param_index: i16,
24409    #[doc = "System ID"]
24410    pub target_system: u8,
24411    #[doc = "Component ID"]
24412    pub target_component: u8,
24413    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24414    #[cfg_attr(feature = "ts", ts(type = "string"))]
24415    pub param_id: CharArray<16>,
24416}
24417impl PARAM_EXT_REQUEST_READ_DATA {
24418    pub const ENCODED_LEN: usize = 20usize;
24419    pub const DEFAULT: Self = Self {
24420        param_index: 0_i16,
24421        target_system: 0_u8,
24422        target_component: 0_u8,
24423        param_id: CharArray::new([0_u8; 16usize]),
24424    };
24425    #[cfg(feature = "arbitrary")]
24426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24427        use arbitrary::{Arbitrary, Unstructured};
24428        let mut buf = [0u8; 1024];
24429        rng.fill_bytes(&mut buf);
24430        let mut unstructured = Unstructured::new(&buf);
24431        Self::arbitrary(&mut unstructured).unwrap_or_default()
24432    }
24433}
24434impl Default for PARAM_EXT_REQUEST_READ_DATA {
24435    fn default() -> Self {
24436        Self::DEFAULT.clone()
24437    }
24438}
24439impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24440    type Message = MavMessage;
24441    const ID: u32 = 320u32;
24442    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24443    const EXTRA_CRC: u8 = 243u8;
24444    const ENCODED_LEN: usize = 20usize;
24445    fn deser(
24446        _version: MavlinkVersion,
24447        __input: &[u8],
24448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24449        let avail_len = __input.len();
24450        let mut payload_buf = [0; Self::ENCODED_LEN];
24451        let mut buf = if avail_len < Self::ENCODED_LEN {
24452            payload_buf[0..avail_len].copy_from_slice(__input);
24453            Bytes::new(&payload_buf)
24454        } else {
24455            Bytes::new(__input)
24456        };
24457        let mut __struct = Self::default();
24458        __struct.param_index = buf.get_i16_le();
24459        __struct.target_system = buf.get_u8();
24460        __struct.target_component = buf.get_u8();
24461        let mut tmp = [0_u8; 16usize];
24462        for v in &mut tmp {
24463            *v = buf.get_u8();
24464        }
24465        __struct.param_id = CharArray::new(tmp);
24466        Ok(__struct)
24467    }
24468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24469        let mut __tmp = BytesMut::new(bytes);
24470        #[allow(clippy::absurd_extreme_comparisons)]
24471        #[allow(unused_comparisons)]
24472        if __tmp.remaining() < Self::ENCODED_LEN {
24473            panic!(
24474                "buffer is too small (need {} bytes, but got {})",
24475                Self::ENCODED_LEN,
24476                __tmp.remaining(),
24477            )
24478        }
24479        __tmp.put_i16_le(self.param_index);
24480        __tmp.put_u8(self.target_system);
24481        __tmp.put_u8(self.target_component);
24482        for val in &self.param_id {
24483            __tmp.put_u8(*val);
24484        }
24485        if matches!(version, MavlinkVersion::V2) {
24486            let len = __tmp.len();
24487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24488        } else {
24489            __tmp.len()
24490        }
24491    }
24492}
24493#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24494#[doc = ""]
24495#[doc = "ID: 323"]
24496#[derive(Debug, Clone, PartialEq)]
24497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24499#[cfg_attr(feature = "ts", derive(TS))]
24500#[cfg_attr(feature = "ts", ts(export))]
24501pub struct PARAM_EXT_SET_DATA {
24502    #[doc = "System ID"]
24503    pub target_system: u8,
24504    #[doc = "Component ID"]
24505    pub target_component: u8,
24506    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24507    #[cfg_attr(feature = "ts", ts(type = "string"))]
24508    pub param_id: CharArray<16>,
24509    #[doc = "Parameter value"]
24510    #[cfg_attr(feature = "ts", ts(type = "string"))]
24511    pub param_value: CharArray<128>,
24512    #[doc = "Parameter type."]
24513    pub param_type: MavParamExtType,
24514}
24515impl PARAM_EXT_SET_DATA {
24516    pub const ENCODED_LEN: usize = 147usize;
24517    pub const DEFAULT: Self = Self {
24518        target_system: 0_u8,
24519        target_component: 0_u8,
24520        param_id: CharArray::new([0_u8; 16usize]),
24521        param_value: CharArray::new([0_u8; 128usize]),
24522        param_type: MavParamExtType::DEFAULT,
24523    };
24524    #[cfg(feature = "arbitrary")]
24525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24526        use arbitrary::{Arbitrary, Unstructured};
24527        let mut buf = [0u8; 1024];
24528        rng.fill_bytes(&mut buf);
24529        let mut unstructured = Unstructured::new(&buf);
24530        Self::arbitrary(&mut unstructured).unwrap_or_default()
24531    }
24532}
24533impl Default for PARAM_EXT_SET_DATA {
24534    fn default() -> Self {
24535        Self::DEFAULT.clone()
24536    }
24537}
24538impl MessageData for PARAM_EXT_SET_DATA {
24539    type Message = MavMessage;
24540    const ID: u32 = 323u32;
24541    const NAME: &'static str = "PARAM_EXT_SET";
24542    const EXTRA_CRC: u8 = 78u8;
24543    const ENCODED_LEN: usize = 147usize;
24544    fn deser(
24545        _version: MavlinkVersion,
24546        __input: &[u8],
24547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24548        let avail_len = __input.len();
24549        let mut payload_buf = [0; Self::ENCODED_LEN];
24550        let mut buf = if avail_len < Self::ENCODED_LEN {
24551            payload_buf[0..avail_len].copy_from_slice(__input);
24552            Bytes::new(&payload_buf)
24553        } else {
24554            Bytes::new(__input)
24555        };
24556        let mut __struct = Self::default();
24557        __struct.target_system = buf.get_u8();
24558        __struct.target_component = buf.get_u8();
24559        let mut tmp = [0_u8; 16usize];
24560        for v in &mut tmp {
24561            *v = buf.get_u8();
24562        }
24563        __struct.param_id = CharArray::new(tmp);
24564        let mut tmp = [0_u8; 128usize];
24565        for v in &mut tmp {
24566            *v = buf.get_u8();
24567        }
24568        __struct.param_value = CharArray::new(tmp);
24569        let tmp = buf.get_u8();
24570        __struct.param_type =
24571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24572                enum_type: "MavParamExtType",
24573                value: tmp as u64,
24574            })?;
24575        Ok(__struct)
24576    }
24577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24578        let mut __tmp = BytesMut::new(bytes);
24579        #[allow(clippy::absurd_extreme_comparisons)]
24580        #[allow(unused_comparisons)]
24581        if __tmp.remaining() < Self::ENCODED_LEN {
24582            panic!(
24583                "buffer is too small (need {} bytes, but got {})",
24584                Self::ENCODED_LEN,
24585                __tmp.remaining(),
24586            )
24587        }
24588        __tmp.put_u8(self.target_system);
24589        __tmp.put_u8(self.target_component);
24590        for val in &self.param_id {
24591            __tmp.put_u8(*val);
24592        }
24593        for val in &self.param_value {
24594            __tmp.put_u8(*val);
24595        }
24596        __tmp.put_u8(self.param_type as u8);
24597        if matches!(version, MavlinkVersion::V2) {
24598            let len = __tmp.len();
24599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24600        } else {
24601            __tmp.len()
24602        }
24603    }
24604}
24605#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24606#[doc = ""]
24607#[doc = "ID: 322"]
24608#[derive(Debug, Clone, PartialEq)]
24609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24611#[cfg_attr(feature = "ts", derive(TS))]
24612#[cfg_attr(feature = "ts", ts(export))]
24613pub struct PARAM_EXT_VALUE_DATA {
24614    #[doc = "Total number of parameters"]
24615    pub param_count: u16,
24616    #[doc = "Index of this parameter"]
24617    pub param_index: u16,
24618    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24619    #[cfg_attr(feature = "ts", ts(type = "string"))]
24620    pub param_id: CharArray<16>,
24621    #[doc = "Parameter value"]
24622    #[cfg_attr(feature = "ts", ts(type = "string"))]
24623    pub param_value: CharArray<128>,
24624    #[doc = "Parameter type."]
24625    pub param_type: MavParamExtType,
24626}
24627impl PARAM_EXT_VALUE_DATA {
24628    pub const ENCODED_LEN: usize = 149usize;
24629    pub const DEFAULT: Self = Self {
24630        param_count: 0_u16,
24631        param_index: 0_u16,
24632        param_id: CharArray::new([0_u8; 16usize]),
24633        param_value: CharArray::new([0_u8; 128usize]),
24634        param_type: MavParamExtType::DEFAULT,
24635    };
24636    #[cfg(feature = "arbitrary")]
24637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24638        use arbitrary::{Arbitrary, Unstructured};
24639        let mut buf = [0u8; 1024];
24640        rng.fill_bytes(&mut buf);
24641        let mut unstructured = Unstructured::new(&buf);
24642        Self::arbitrary(&mut unstructured).unwrap_or_default()
24643    }
24644}
24645impl Default for PARAM_EXT_VALUE_DATA {
24646    fn default() -> Self {
24647        Self::DEFAULT.clone()
24648    }
24649}
24650impl MessageData for PARAM_EXT_VALUE_DATA {
24651    type Message = MavMessage;
24652    const ID: u32 = 322u32;
24653    const NAME: &'static str = "PARAM_EXT_VALUE";
24654    const EXTRA_CRC: u8 = 243u8;
24655    const ENCODED_LEN: usize = 149usize;
24656    fn deser(
24657        _version: MavlinkVersion,
24658        __input: &[u8],
24659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24660        let avail_len = __input.len();
24661        let mut payload_buf = [0; Self::ENCODED_LEN];
24662        let mut buf = if avail_len < Self::ENCODED_LEN {
24663            payload_buf[0..avail_len].copy_from_slice(__input);
24664            Bytes::new(&payload_buf)
24665        } else {
24666            Bytes::new(__input)
24667        };
24668        let mut __struct = Self::default();
24669        __struct.param_count = buf.get_u16_le();
24670        __struct.param_index = buf.get_u16_le();
24671        let mut tmp = [0_u8; 16usize];
24672        for v in &mut tmp {
24673            *v = buf.get_u8();
24674        }
24675        __struct.param_id = CharArray::new(tmp);
24676        let mut tmp = [0_u8; 128usize];
24677        for v in &mut tmp {
24678            *v = buf.get_u8();
24679        }
24680        __struct.param_value = CharArray::new(tmp);
24681        let tmp = buf.get_u8();
24682        __struct.param_type =
24683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24684                enum_type: "MavParamExtType",
24685                value: tmp as u64,
24686            })?;
24687        Ok(__struct)
24688    }
24689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24690        let mut __tmp = BytesMut::new(bytes);
24691        #[allow(clippy::absurd_extreme_comparisons)]
24692        #[allow(unused_comparisons)]
24693        if __tmp.remaining() < Self::ENCODED_LEN {
24694            panic!(
24695                "buffer is too small (need {} bytes, but got {})",
24696                Self::ENCODED_LEN,
24697                __tmp.remaining(),
24698            )
24699        }
24700        __tmp.put_u16_le(self.param_count);
24701        __tmp.put_u16_le(self.param_index);
24702        for val in &self.param_id {
24703            __tmp.put_u8(*val);
24704        }
24705        for val in &self.param_value {
24706            __tmp.put_u8(*val);
24707        }
24708        __tmp.put_u8(self.param_type as u8);
24709        if matches!(version, MavlinkVersion::V2) {
24710            let len = __tmp.len();
24711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24712        } else {
24713            __tmp.len()
24714        }
24715    }
24716}
24717#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24718#[doc = ""]
24719#[doc = "ID: 50"]
24720#[derive(Debug, Clone, PartialEq)]
24721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24723#[cfg_attr(feature = "ts", derive(TS))]
24724#[cfg_attr(feature = "ts", ts(export))]
24725pub struct PARAM_MAP_RC_DATA {
24726    #[doc = "Initial parameter value"]
24727    pub param_value0: f32,
24728    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24729    pub scale: f32,
24730    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24731    pub param_value_min: f32,
24732    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24733    pub param_value_max: f32,
24734    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24735    pub param_index: i16,
24736    #[doc = "System ID"]
24737    pub target_system: u8,
24738    #[doc = "Component ID"]
24739    pub target_component: u8,
24740    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24741    #[cfg_attr(feature = "ts", ts(type = "string"))]
24742    pub param_id: CharArray<16>,
24743    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24744    pub parameter_rc_channel_index: u8,
24745}
24746impl PARAM_MAP_RC_DATA {
24747    pub const ENCODED_LEN: usize = 37usize;
24748    pub const DEFAULT: Self = Self {
24749        param_value0: 0.0_f32,
24750        scale: 0.0_f32,
24751        param_value_min: 0.0_f32,
24752        param_value_max: 0.0_f32,
24753        param_index: 0_i16,
24754        target_system: 0_u8,
24755        target_component: 0_u8,
24756        param_id: CharArray::new([0_u8; 16usize]),
24757        parameter_rc_channel_index: 0_u8,
24758    };
24759    #[cfg(feature = "arbitrary")]
24760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24761        use arbitrary::{Arbitrary, Unstructured};
24762        let mut buf = [0u8; 1024];
24763        rng.fill_bytes(&mut buf);
24764        let mut unstructured = Unstructured::new(&buf);
24765        Self::arbitrary(&mut unstructured).unwrap_or_default()
24766    }
24767}
24768impl Default for PARAM_MAP_RC_DATA {
24769    fn default() -> Self {
24770        Self::DEFAULT.clone()
24771    }
24772}
24773impl MessageData for PARAM_MAP_RC_DATA {
24774    type Message = MavMessage;
24775    const ID: u32 = 50u32;
24776    const NAME: &'static str = "PARAM_MAP_RC";
24777    const EXTRA_CRC: u8 = 78u8;
24778    const ENCODED_LEN: usize = 37usize;
24779    fn deser(
24780        _version: MavlinkVersion,
24781        __input: &[u8],
24782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24783        let avail_len = __input.len();
24784        let mut payload_buf = [0; Self::ENCODED_LEN];
24785        let mut buf = if avail_len < Self::ENCODED_LEN {
24786            payload_buf[0..avail_len].copy_from_slice(__input);
24787            Bytes::new(&payload_buf)
24788        } else {
24789            Bytes::new(__input)
24790        };
24791        let mut __struct = Self::default();
24792        __struct.param_value0 = buf.get_f32_le();
24793        __struct.scale = buf.get_f32_le();
24794        __struct.param_value_min = buf.get_f32_le();
24795        __struct.param_value_max = buf.get_f32_le();
24796        __struct.param_index = buf.get_i16_le();
24797        __struct.target_system = buf.get_u8();
24798        __struct.target_component = buf.get_u8();
24799        let mut tmp = [0_u8; 16usize];
24800        for v in &mut tmp {
24801            *v = buf.get_u8();
24802        }
24803        __struct.param_id = CharArray::new(tmp);
24804        __struct.parameter_rc_channel_index = buf.get_u8();
24805        Ok(__struct)
24806    }
24807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24808        let mut __tmp = BytesMut::new(bytes);
24809        #[allow(clippy::absurd_extreme_comparisons)]
24810        #[allow(unused_comparisons)]
24811        if __tmp.remaining() < Self::ENCODED_LEN {
24812            panic!(
24813                "buffer is too small (need {} bytes, but got {})",
24814                Self::ENCODED_LEN,
24815                __tmp.remaining(),
24816            )
24817        }
24818        __tmp.put_f32_le(self.param_value0);
24819        __tmp.put_f32_le(self.scale);
24820        __tmp.put_f32_le(self.param_value_min);
24821        __tmp.put_f32_le(self.param_value_max);
24822        __tmp.put_i16_le(self.param_index);
24823        __tmp.put_u8(self.target_system);
24824        __tmp.put_u8(self.target_component);
24825        for val in &self.param_id {
24826            __tmp.put_u8(*val);
24827        }
24828        __tmp.put_u8(self.parameter_rc_channel_index);
24829        if matches!(version, MavlinkVersion::V2) {
24830            let len = __tmp.len();
24831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24832        } else {
24833            __tmp.len()
24834        }
24835    }
24836}
24837#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24838#[doc = ""]
24839#[doc = "ID: 21"]
24840#[derive(Debug, Clone, PartialEq)]
24841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24843#[cfg_attr(feature = "ts", derive(TS))]
24844#[cfg_attr(feature = "ts", ts(export))]
24845pub struct PARAM_REQUEST_LIST_DATA {
24846    #[doc = "System ID"]
24847    pub target_system: u8,
24848    #[doc = "Component ID"]
24849    pub target_component: u8,
24850}
24851impl PARAM_REQUEST_LIST_DATA {
24852    pub const ENCODED_LEN: usize = 2usize;
24853    pub const DEFAULT: Self = Self {
24854        target_system: 0_u8,
24855        target_component: 0_u8,
24856    };
24857    #[cfg(feature = "arbitrary")]
24858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24859        use arbitrary::{Arbitrary, Unstructured};
24860        let mut buf = [0u8; 1024];
24861        rng.fill_bytes(&mut buf);
24862        let mut unstructured = Unstructured::new(&buf);
24863        Self::arbitrary(&mut unstructured).unwrap_or_default()
24864    }
24865}
24866impl Default for PARAM_REQUEST_LIST_DATA {
24867    fn default() -> Self {
24868        Self::DEFAULT.clone()
24869    }
24870}
24871impl MessageData for PARAM_REQUEST_LIST_DATA {
24872    type Message = MavMessage;
24873    const ID: u32 = 21u32;
24874    const NAME: &'static str = "PARAM_REQUEST_LIST";
24875    const EXTRA_CRC: u8 = 159u8;
24876    const ENCODED_LEN: usize = 2usize;
24877    fn deser(
24878        _version: MavlinkVersion,
24879        __input: &[u8],
24880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24881        let avail_len = __input.len();
24882        let mut payload_buf = [0; Self::ENCODED_LEN];
24883        let mut buf = if avail_len < Self::ENCODED_LEN {
24884            payload_buf[0..avail_len].copy_from_slice(__input);
24885            Bytes::new(&payload_buf)
24886        } else {
24887            Bytes::new(__input)
24888        };
24889        let mut __struct = Self::default();
24890        __struct.target_system = buf.get_u8();
24891        __struct.target_component = buf.get_u8();
24892        Ok(__struct)
24893    }
24894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24895        let mut __tmp = BytesMut::new(bytes);
24896        #[allow(clippy::absurd_extreme_comparisons)]
24897        #[allow(unused_comparisons)]
24898        if __tmp.remaining() < Self::ENCODED_LEN {
24899            panic!(
24900                "buffer is too small (need {} bytes, but got {})",
24901                Self::ENCODED_LEN,
24902                __tmp.remaining(),
24903            )
24904        }
24905        __tmp.put_u8(self.target_system);
24906        __tmp.put_u8(self.target_component);
24907        if matches!(version, MavlinkVersion::V2) {
24908            let len = __tmp.len();
24909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24910        } else {
24911            __tmp.len()
24912        }
24913    }
24914}
24915#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24916#[doc = ""]
24917#[doc = "ID: 20"]
24918#[derive(Debug, Clone, PartialEq)]
24919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24921#[cfg_attr(feature = "ts", derive(TS))]
24922#[cfg_attr(feature = "ts", ts(export))]
24923pub struct PARAM_REQUEST_READ_DATA {
24924    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24925    pub param_index: i16,
24926    #[doc = "System ID"]
24927    pub target_system: u8,
24928    #[doc = "Component ID"]
24929    pub target_component: u8,
24930    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24931    #[cfg_attr(feature = "ts", ts(type = "string"))]
24932    pub param_id: CharArray<16>,
24933}
24934impl PARAM_REQUEST_READ_DATA {
24935    pub const ENCODED_LEN: usize = 20usize;
24936    pub const DEFAULT: Self = Self {
24937        param_index: 0_i16,
24938        target_system: 0_u8,
24939        target_component: 0_u8,
24940        param_id: CharArray::new([0_u8; 16usize]),
24941    };
24942    #[cfg(feature = "arbitrary")]
24943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24944        use arbitrary::{Arbitrary, Unstructured};
24945        let mut buf = [0u8; 1024];
24946        rng.fill_bytes(&mut buf);
24947        let mut unstructured = Unstructured::new(&buf);
24948        Self::arbitrary(&mut unstructured).unwrap_or_default()
24949    }
24950}
24951impl Default for PARAM_REQUEST_READ_DATA {
24952    fn default() -> Self {
24953        Self::DEFAULT.clone()
24954    }
24955}
24956impl MessageData for PARAM_REQUEST_READ_DATA {
24957    type Message = MavMessage;
24958    const ID: u32 = 20u32;
24959    const NAME: &'static str = "PARAM_REQUEST_READ";
24960    const EXTRA_CRC: u8 = 214u8;
24961    const ENCODED_LEN: usize = 20usize;
24962    fn deser(
24963        _version: MavlinkVersion,
24964        __input: &[u8],
24965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24966        let avail_len = __input.len();
24967        let mut payload_buf = [0; Self::ENCODED_LEN];
24968        let mut buf = if avail_len < Self::ENCODED_LEN {
24969            payload_buf[0..avail_len].copy_from_slice(__input);
24970            Bytes::new(&payload_buf)
24971        } else {
24972            Bytes::new(__input)
24973        };
24974        let mut __struct = Self::default();
24975        __struct.param_index = buf.get_i16_le();
24976        __struct.target_system = buf.get_u8();
24977        __struct.target_component = buf.get_u8();
24978        let mut tmp = [0_u8; 16usize];
24979        for v in &mut tmp {
24980            *v = buf.get_u8();
24981        }
24982        __struct.param_id = CharArray::new(tmp);
24983        Ok(__struct)
24984    }
24985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24986        let mut __tmp = BytesMut::new(bytes);
24987        #[allow(clippy::absurd_extreme_comparisons)]
24988        #[allow(unused_comparisons)]
24989        if __tmp.remaining() < Self::ENCODED_LEN {
24990            panic!(
24991                "buffer is too small (need {} bytes, but got {})",
24992                Self::ENCODED_LEN,
24993                __tmp.remaining(),
24994            )
24995        }
24996        __tmp.put_i16_le(self.param_index);
24997        __tmp.put_u8(self.target_system);
24998        __tmp.put_u8(self.target_component);
24999        for val in &self.param_id {
25000            __tmp.put_u8(*val);
25001        }
25002        if matches!(version, MavlinkVersion::V2) {
25003            let len = __tmp.len();
25004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25005        } else {
25006            __tmp.len()
25007        }
25008    }
25009}
25010#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25011#[doc = ""]
25012#[doc = "ID: 23"]
25013#[derive(Debug, Clone, PartialEq)]
25014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25016#[cfg_attr(feature = "ts", derive(TS))]
25017#[cfg_attr(feature = "ts", ts(export))]
25018pub struct PARAM_SET_DATA {
25019    #[doc = "Onboard parameter value"]
25020    pub param_value: f32,
25021    #[doc = "System ID"]
25022    pub target_system: u8,
25023    #[doc = "Component ID"]
25024    pub target_component: u8,
25025    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25026    #[cfg_attr(feature = "ts", ts(type = "string"))]
25027    pub param_id: CharArray<16>,
25028    #[doc = "Onboard parameter type."]
25029    pub param_type: MavParamType,
25030}
25031impl PARAM_SET_DATA {
25032    pub const ENCODED_LEN: usize = 23usize;
25033    pub const DEFAULT: Self = Self {
25034        param_value: 0.0_f32,
25035        target_system: 0_u8,
25036        target_component: 0_u8,
25037        param_id: CharArray::new([0_u8; 16usize]),
25038        param_type: MavParamType::DEFAULT,
25039    };
25040    #[cfg(feature = "arbitrary")]
25041    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25042        use arbitrary::{Arbitrary, Unstructured};
25043        let mut buf = [0u8; 1024];
25044        rng.fill_bytes(&mut buf);
25045        let mut unstructured = Unstructured::new(&buf);
25046        Self::arbitrary(&mut unstructured).unwrap_or_default()
25047    }
25048}
25049impl Default for PARAM_SET_DATA {
25050    fn default() -> Self {
25051        Self::DEFAULT.clone()
25052    }
25053}
25054impl MessageData for PARAM_SET_DATA {
25055    type Message = MavMessage;
25056    const ID: u32 = 23u32;
25057    const NAME: &'static str = "PARAM_SET";
25058    const EXTRA_CRC: u8 = 168u8;
25059    const ENCODED_LEN: usize = 23usize;
25060    fn deser(
25061        _version: MavlinkVersion,
25062        __input: &[u8],
25063    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25064        let avail_len = __input.len();
25065        let mut payload_buf = [0; Self::ENCODED_LEN];
25066        let mut buf = if avail_len < Self::ENCODED_LEN {
25067            payload_buf[0..avail_len].copy_from_slice(__input);
25068            Bytes::new(&payload_buf)
25069        } else {
25070            Bytes::new(__input)
25071        };
25072        let mut __struct = Self::default();
25073        __struct.param_value = buf.get_f32_le();
25074        __struct.target_system = buf.get_u8();
25075        __struct.target_component = buf.get_u8();
25076        let mut tmp = [0_u8; 16usize];
25077        for v in &mut tmp {
25078            *v = buf.get_u8();
25079        }
25080        __struct.param_id = CharArray::new(tmp);
25081        let tmp = buf.get_u8();
25082        __struct.param_type =
25083            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25084                enum_type: "MavParamType",
25085                value: tmp as u64,
25086            })?;
25087        Ok(__struct)
25088    }
25089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25090        let mut __tmp = BytesMut::new(bytes);
25091        #[allow(clippy::absurd_extreme_comparisons)]
25092        #[allow(unused_comparisons)]
25093        if __tmp.remaining() < Self::ENCODED_LEN {
25094            panic!(
25095                "buffer is too small (need {} bytes, but got {})",
25096                Self::ENCODED_LEN,
25097                __tmp.remaining(),
25098            )
25099        }
25100        __tmp.put_f32_le(self.param_value);
25101        __tmp.put_u8(self.target_system);
25102        __tmp.put_u8(self.target_component);
25103        for val in &self.param_id {
25104            __tmp.put_u8(*val);
25105        }
25106        __tmp.put_u8(self.param_type as u8);
25107        if matches!(version, MavlinkVersion::V2) {
25108            let len = __tmp.len();
25109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25110        } else {
25111            __tmp.len()
25112        }
25113    }
25114}
25115#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25116#[doc = ""]
25117#[doc = "ID: 22"]
25118#[derive(Debug, Clone, PartialEq)]
25119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25121#[cfg_attr(feature = "ts", derive(TS))]
25122#[cfg_attr(feature = "ts", ts(export))]
25123pub struct PARAM_VALUE_DATA {
25124    #[doc = "Onboard parameter value"]
25125    pub param_value: f32,
25126    #[doc = "Total number of onboard parameters"]
25127    pub param_count: u16,
25128    #[doc = "Index of this onboard parameter"]
25129    pub param_index: u16,
25130    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25131    #[cfg_attr(feature = "ts", ts(type = "string"))]
25132    pub param_id: CharArray<16>,
25133    #[doc = "Onboard parameter type."]
25134    pub param_type: MavParamType,
25135}
25136impl PARAM_VALUE_DATA {
25137    pub const ENCODED_LEN: usize = 25usize;
25138    pub const DEFAULT: Self = Self {
25139        param_value: 0.0_f32,
25140        param_count: 0_u16,
25141        param_index: 0_u16,
25142        param_id: CharArray::new([0_u8; 16usize]),
25143        param_type: MavParamType::DEFAULT,
25144    };
25145    #[cfg(feature = "arbitrary")]
25146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25147        use arbitrary::{Arbitrary, Unstructured};
25148        let mut buf = [0u8; 1024];
25149        rng.fill_bytes(&mut buf);
25150        let mut unstructured = Unstructured::new(&buf);
25151        Self::arbitrary(&mut unstructured).unwrap_or_default()
25152    }
25153}
25154impl Default for PARAM_VALUE_DATA {
25155    fn default() -> Self {
25156        Self::DEFAULT.clone()
25157    }
25158}
25159impl MessageData for PARAM_VALUE_DATA {
25160    type Message = MavMessage;
25161    const ID: u32 = 22u32;
25162    const NAME: &'static str = "PARAM_VALUE";
25163    const EXTRA_CRC: u8 = 220u8;
25164    const ENCODED_LEN: usize = 25usize;
25165    fn deser(
25166        _version: MavlinkVersion,
25167        __input: &[u8],
25168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25169        let avail_len = __input.len();
25170        let mut payload_buf = [0; Self::ENCODED_LEN];
25171        let mut buf = if avail_len < Self::ENCODED_LEN {
25172            payload_buf[0..avail_len].copy_from_slice(__input);
25173            Bytes::new(&payload_buf)
25174        } else {
25175            Bytes::new(__input)
25176        };
25177        let mut __struct = Self::default();
25178        __struct.param_value = buf.get_f32_le();
25179        __struct.param_count = buf.get_u16_le();
25180        __struct.param_index = buf.get_u16_le();
25181        let mut tmp = [0_u8; 16usize];
25182        for v in &mut tmp {
25183            *v = buf.get_u8();
25184        }
25185        __struct.param_id = CharArray::new(tmp);
25186        let tmp = buf.get_u8();
25187        __struct.param_type =
25188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25189                enum_type: "MavParamType",
25190                value: tmp as u64,
25191            })?;
25192        Ok(__struct)
25193    }
25194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25195        let mut __tmp = BytesMut::new(bytes);
25196        #[allow(clippy::absurd_extreme_comparisons)]
25197        #[allow(unused_comparisons)]
25198        if __tmp.remaining() < Self::ENCODED_LEN {
25199            panic!(
25200                "buffer is too small (need {} bytes, but got {})",
25201                Self::ENCODED_LEN,
25202                __tmp.remaining(),
25203            )
25204        }
25205        __tmp.put_f32_le(self.param_value);
25206        __tmp.put_u16_le(self.param_count);
25207        __tmp.put_u16_le(self.param_index);
25208        for val in &self.param_id {
25209            __tmp.put_u8(*val);
25210        }
25211        __tmp.put_u8(self.param_type as u8);
25212        if matches!(version, MavlinkVersion::V2) {
25213            let len = __tmp.len();
25214            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25215        } else {
25216            __tmp.len()
25217        }
25218    }
25219}
25220#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
25221#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
25222#[doc = ""]
25223#[doc = "ID: 4"]
25224#[derive(Debug, Clone, PartialEq)]
25225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25227#[cfg_attr(feature = "ts", derive(TS))]
25228#[cfg_attr(feature = "ts", ts(export))]
25229pub struct PING_DATA {
25230    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25231    pub time_usec: u64,
25232    #[doc = "PING sequence"]
25233    pub seq: u32,
25234    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
25235    pub target_system: u8,
25236    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
25237    pub target_component: u8,
25238}
25239impl PING_DATA {
25240    pub const ENCODED_LEN: usize = 14usize;
25241    pub const DEFAULT: Self = Self {
25242        time_usec: 0_u64,
25243        seq: 0_u32,
25244        target_system: 0_u8,
25245        target_component: 0_u8,
25246    };
25247    #[cfg(feature = "arbitrary")]
25248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25249        use arbitrary::{Arbitrary, Unstructured};
25250        let mut buf = [0u8; 1024];
25251        rng.fill_bytes(&mut buf);
25252        let mut unstructured = Unstructured::new(&buf);
25253        Self::arbitrary(&mut unstructured).unwrap_or_default()
25254    }
25255}
25256impl Default for PING_DATA {
25257    fn default() -> Self {
25258        Self::DEFAULT.clone()
25259    }
25260}
25261impl MessageData for PING_DATA {
25262    type Message = MavMessage;
25263    const ID: u32 = 4u32;
25264    const NAME: &'static str = "PING";
25265    const EXTRA_CRC: u8 = 237u8;
25266    const ENCODED_LEN: usize = 14usize;
25267    fn deser(
25268        _version: MavlinkVersion,
25269        __input: &[u8],
25270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25271        let avail_len = __input.len();
25272        let mut payload_buf = [0; Self::ENCODED_LEN];
25273        let mut buf = if avail_len < Self::ENCODED_LEN {
25274            payload_buf[0..avail_len].copy_from_slice(__input);
25275            Bytes::new(&payload_buf)
25276        } else {
25277            Bytes::new(__input)
25278        };
25279        let mut __struct = Self::default();
25280        __struct.time_usec = buf.get_u64_le();
25281        __struct.seq = buf.get_u32_le();
25282        __struct.target_system = buf.get_u8();
25283        __struct.target_component = buf.get_u8();
25284        Ok(__struct)
25285    }
25286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25287        let mut __tmp = BytesMut::new(bytes);
25288        #[allow(clippy::absurd_extreme_comparisons)]
25289        #[allow(unused_comparisons)]
25290        if __tmp.remaining() < Self::ENCODED_LEN {
25291            panic!(
25292                "buffer is too small (need {} bytes, but got {})",
25293                Self::ENCODED_LEN,
25294                __tmp.remaining(),
25295            )
25296        }
25297        __tmp.put_u64_le(self.time_usec);
25298        __tmp.put_u32_le(self.seq);
25299        __tmp.put_u8(self.target_system);
25300        __tmp.put_u8(self.target_component);
25301        if matches!(version, MavlinkVersion::V2) {
25302            let len = __tmp.len();
25303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25304        } else {
25305            __tmp.len()
25306        }
25307    }
25308}
25309#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25310#[doc = "Control vehicle tone generation (buzzer)."]
25311#[doc = ""]
25312#[doc = "ID: 258"]
25313#[derive(Debug, Clone, PartialEq)]
25314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25316#[cfg_attr(feature = "ts", derive(TS))]
25317#[cfg_attr(feature = "ts", ts(export))]
25318pub struct PLAY_TUNE_DATA {
25319    #[doc = "System ID"]
25320    pub target_system: u8,
25321    #[doc = "Component ID"]
25322    pub target_component: u8,
25323    #[doc = "tune in board specific format"]
25324    #[cfg_attr(feature = "ts", ts(type = "string"))]
25325    pub tune: CharArray<30>,
25326    #[doc = "tune extension (appended to tune)"]
25327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25328    #[cfg_attr(feature = "ts", ts(type = "string"))]
25329    pub tune2: CharArray<200>,
25330}
25331impl PLAY_TUNE_DATA {
25332    pub const ENCODED_LEN: usize = 232usize;
25333    pub const DEFAULT: Self = Self {
25334        target_system: 0_u8,
25335        target_component: 0_u8,
25336        tune: CharArray::new([0_u8; 30usize]),
25337        tune2: CharArray::new([0_u8; 200usize]),
25338    };
25339    #[cfg(feature = "arbitrary")]
25340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25341        use arbitrary::{Arbitrary, Unstructured};
25342        let mut buf = [0u8; 1024];
25343        rng.fill_bytes(&mut buf);
25344        let mut unstructured = Unstructured::new(&buf);
25345        Self::arbitrary(&mut unstructured).unwrap_or_default()
25346    }
25347}
25348impl Default for PLAY_TUNE_DATA {
25349    fn default() -> Self {
25350        Self::DEFAULT.clone()
25351    }
25352}
25353impl MessageData for PLAY_TUNE_DATA {
25354    type Message = MavMessage;
25355    const ID: u32 = 258u32;
25356    const NAME: &'static str = "PLAY_TUNE";
25357    const EXTRA_CRC: u8 = 187u8;
25358    const ENCODED_LEN: usize = 232usize;
25359    fn deser(
25360        _version: MavlinkVersion,
25361        __input: &[u8],
25362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25363        let avail_len = __input.len();
25364        let mut payload_buf = [0; Self::ENCODED_LEN];
25365        let mut buf = if avail_len < Self::ENCODED_LEN {
25366            payload_buf[0..avail_len].copy_from_slice(__input);
25367            Bytes::new(&payload_buf)
25368        } else {
25369            Bytes::new(__input)
25370        };
25371        let mut __struct = Self::default();
25372        __struct.target_system = buf.get_u8();
25373        __struct.target_component = buf.get_u8();
25374        let mut tmp = [0_u8; 30usize];
25375        for v in &mut tmp {
25376            *v = buf.get_u8();
25377        }
25378        __struct.tune = CharArray::new(tmp);
25379        let mut tmp = [0_u8; 200usize];
25380        for v in &mut tmp {
25381            *v = buf.get_u8();
25382        }
25383        __struct.tune2 = CharArray::new(tmp);
25384        Ok(__struct)
25385    }
25386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25387        let mut __tmp = BytesMut::new(bytes);
25388        #[allow(clippy::absurd_extreme_comparisons)]
25389        #[allow(unused_comparisons)]
25390        if __tmp.remaining() < Self::ENCODED_LEN {
25391            panic!(
25392                "buffer is too small (need {} bytes, but got {})",
25393                Self::ENCODED_LEN,
25394                __tmp.remaining(),
25395            )
25396        }
25397        __tmp.put_u8(self.target_system);
25398        __tmp.put_u8(self.target_component);
25399        for val in &self.tune {
25400            __tmp.put_u8(*val);
25401        }
25402        if matches!(version, MavlinkVersion::V2) {
25403            for val in &self.tune2 {
25404                __tmp.put_u8(*val);
25405            }
25406            let len = __tmp.len();
25407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25408        } else {
25409            __tmp.len()
25410        }
25411    }
25412}
25413#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25414#[doc = ""]
25415#[doc = "ID: 400"]
25416#[derive(Debug, Clone, PartialEq)]
25417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25419#[cfg_attr(feature = "ts", derive(TS))]
25420#[cfg_attr(feature = "ts", ts(export))]
25421pub struct PLAY_TUNE_V2_DATA {
25422    #[doc = "Tune format"]
25423    pub format: TuneFormat,
25424    #[doc = "System ID"]
25425    pub target_system: u8,
25426    #[doc = "Component ID"]
25427    pub target_component: u8,
25428    #[doc = "Tune definition as a NULL-terminated string."]
25429    #[cfg_attr(feature = "ts", ts(type = "string"))]
25430    pub tune: CharArray<248>,
25431}
25432impl PLAY_TUNE_V2_DATA {
25433    pub const ENCODED_LEN: usize = 254usize;
25434    pub const DEFAULT: Self = Self {
25435        format: TuneFormat::DEFAULT,
25436        target_system: 0_u8,
25437        target_component: 0_u8,
25438        tune: CharArray::new([0_u8; 248usize]),
25439    };
25440    #[cfg(feature = "arbitrary")]
25441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25442        use arbitrary::{Arbitrary, Unstructured};
25443        let mut buf = [0u8; 1024];
25444        rng.fill_bytes(&mut buf);
25445        let mut unstructured = Unstructured::new(&buf);
25446        Self::arbitrary(&mut unstructured).unwrap_or_default()
25447    }
25448}
25449impl Default for PLAY_TUNE_V2_DATA {
25450    fn default() -> Self {
25451        Self::DEFAULT.clone()
25452    }
25453}
25454impl MessageData for PLAY_TUNE_V2_DATA {
25455    type Message = MavMessage;
25456    const ID: u32 = 400u32;
25457    const NAME: &'static str = "PLAY_TUNE_V2";
25458    const EXTRA_CRC: u8 = 110u8;
25459    const ENCODED_LEN: usize = 254usize;
25460    fn deser(
25461        _version: MavlinkVersion,
25462        __input: &[u8],
25463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25464        let avail_len = __input.len();
25465        let mut payload_buf = [0; Self::ENCODED_LEN];
25466        let mut buf = if avail_len < Self::ENCODED_LEN {
25467            payload_buf[0..avail_len].copy_from_slice(__input);
25468            Bytes::new(&payload_buf)
25469        } else {
25470            Bytes::new(__input)
25471        };
25472        let mut __struct = Self::default();
25473        let tmp = buf.get_u32_le();
25474        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25475            ::mavlink_core::error::ParserError::InvalidEnum {
25476                enum_type: "TuneFormat",
25477                value: tmp as u64,
25478            },
25479        )?;
25480        __struct.target_system = buf.get_u8();
25481        __struct.target_component = buf.get_u8();
25482        let mut tmp = [0_u8; 248usize];
25483        for v in &mut tmp {
25484            *v = buf.get_u8();
25485        }
25486        __struct.tune = CharArray::new(tmp);
25487        Ok(__struct)
25488    }
25489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25490        let mut __tmp = BytesMut::new(bytes);
25491        #[allow(clippy::absurd_extreme_comparisons)]
25492        #[allow(unused_comparisons)]
25493        if __tmp.remaining() < Self::ENCODED_LEN {
25494            panic!(
25495                "buffer is too small (need {} bytes, but got {})",
25496                Self::ENCODED_LEN,
25497                __tmp.remaining(),
25498            )
25499        }
25500        __tmp.put_u32_le(self.format as u32);
25501        __tmp.put_u8(self.target_system);
25502        __tmp.put_u8(self.target_component);
25503        for val in &self.tune {
25504            __tmp.put_u8(*val);
25505        }
25506        if matches!(version, MavlinkVersion::V2) {
25507            let len = __tmp.len();
25508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25509        } else {
25510            __tmp.len()
25511        }
25512    }
25513}
25514#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25515#[doc = ""]
25516#[doc = "ID: 87"]
25517#[derive(Debug, Clone, PartialEq)]
25518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25520#[cfg_attr(feature = "ts", derive(TS))]
25521#[cfg_attr(feature = "ts", ts(export))]
25522pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25523    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25524    pub time_boot_ms: u32,
25525    #[doc = "Latitude in WGS84 frame"]
25526    pub lat_int: i32,
25527    #[doc = "Longitude in WGS84 frame"]
25528    pub lon_int: i32,
25529    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25530    pub alt: f32,
25531    #[doc = "X velocity in NED frame"]
25532    pub vx: f32,
25533    #[doc = "Y velocity in NED frame"]
25534    pub vy: f32,
25535    #[doc = "Z velocity in NED frame"]
25536    pub vz: f32,
25537    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25538    pub afx: f32,
25539    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25540    pub afy: f32,
25541    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25542    pub afz: f32,
25543    #[doc = "yaw setpoint"]
25544    pub yaw: f32,
25545    #[doc = "yaw rate setpoint"]
25546    pub yaw_rate: f32,
25547    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25548    pub type_mask: PositionTargetTypemask,
25549    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25550    pub coordinate_frame: MavFrame,
25551}
25552impl POSITION_TARGET_GLOBAL_INT_DATA {
25553    pub const ENCODED_LEN: usize = 51usize;
25554    pub const DEFAULT: Self = Self {
25555        time_boot_ms: 0_u32,
25556        lat_int: 0_i32,
25557        lon_int: 0_i32,
25558        alt: 0.0_f32,
25559        vx: 0.0_f32,
25560        vy: 0.0_f32,
25561        vz: 0.0_f32,
25562        afx: 0.0_f32,
25563        afy: 0.0_f32,
25564        afz: 0.0_f32,
25565        yaw: 0.0_f32,
25566        yaw_rate: 0.0_f32,
25567        type_mask: PositionTargetTypemask::DEFAULT,
25568        coordinate_frame: MavFrame::DEFAULT,
25569    };
25570    #[cfg(feature = "arbitrary")]
25571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25572        use arbitrary::{Arbitrary, Unstructured};
25573        let mut buf = [0u8; 1024];
25574        rng.fill_bytes(&mut buf);
25575        let mut unstructured = Unstructured::new(&buf);
25576        Self::arbitrary(&mut unstructured).unwrap_or_default()
25577    }
25578}
25579impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25580    fn default() -> Self {
25581        Self::DEFAULT.clone()
25582    }
25583}
25584impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25585    type Message = MavMessage;
25586    const ID: u32 = 87u32;
25587    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25588    const EXTRA_CRC: u8 = 150u8;
25589    const ENCODED_LEN: usize = 51usize;
25590    fn deser(
25591        _version: MavlinkVersion,
25592        __input: &[u8],
25593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25594        let avail_len = __input.len();
25595        let mut payload_buf = [0; Self::ENCODED_LEN];
25596        let mut buf = if avail_len < Self::ENCODED_LEN {
25597            payload_buf[0..avail_len].copy_from_slice(__input);
25598            Bytes::new(&payload_buf)
25599        } else {
25600            Bytes::new(__input)
25601        };
25602        let mut __struct = Self::default();
25603        __struct.time_boot_ms = buf.get_u32_le();
25604        __struct.lat_int = buf.get_i32_le();
25605        __struct.lon_int = buf.get_i32_le();
25606        __struct.alt = buf.get_f32_le();
25607        __struct.vx = buf.get_f32_le();
25608        __struct.vy = buf.get_f32_le();
25609        __struct.vz = buf.get_f32_le();
25610        __struct.afx = buf.get_f32_le();
25611        __struct.afy = buf.get_f32_le();
25612        __struct.afz = buf.get_f32_le();
25613        __struct.yaw = buf.get_f32_le();
25614        __struct.yaw_rate = buf.get_f32_le();
25615        let tmp = buf.get_u16_le();
25616        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25617            ::mavlink_core::error::ParserError::InvalidFlag {
25618                flag_type: "PositionTargetTypemask",
25619                value: tmp as u64,
25620            },
25621        )?;
25622        let tmp = buf.get_u8();
25623        __struct.coordinate_frame =
25624            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25625                enum_type: "MavFrame",
25626                value: tmp as u64,
25627            })?;
25628        Ok(__struct)
25629    }
25630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25631        let mut __tmp = BytesMut::new(bytes);
25632        #[allow(clippy::absurd_extreme_comparisons)]
25633        #[allow(unused_comparisons)]
25634        if __tmp.remaining() < Self::ENCODED_LEN {
25635            panic!(
25636                "buffer is too small (need {} bytes, but got {})",
25637                Self::ENCODED_LEN,
25638                __tmp.remaining(),
25639            )
25640        }
25641        __tmp.put_u32_le(self.time_boot_ms);
25642        __tmp.put_i32_le(self.lat_int);
25643        __tmp.put_i32_le(self.lon_int);
25644        __tmp.put_f32_le(self.alt);
25645        __tmp.put_f32_le(self.vx);
25646        __tmp.put_f32_le(self.vy);
25647        __tmp.put_f32_le(self.vz);
25648        __tmp.put_f32_le(self.afx);
25649        __tmp.put_f32_le(self.afy);
25650        __tmp.put_f32_le(self.afz);
25651        __tmp.put_f32_le(self.yaw);
25652        __tmp.put_f32_le(self.yaw_rate);
25653        __tmp.put_u16_le(self.type_mask.bits());
25654        __tmp.put_u8(self.coordinate_frame as u8);
25655        if matches!(version, MavlinkVersion::V2) {
25656            let len = __tmp.len();
25657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25658        } else {
25659            __tmp.len()
25660        }
25661    }
25662}
25663#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25664#[doc = ""]
25665#[doc = "ID: 85"]
25666#[derive(Debug, Clone, PartialEq)]
25667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25669#[cfg_attr(feature = "ts", derive(TS))]
25670#[cfg_attr(feature = "ts", ts(export))]
25671pub struct POSITION_TARGET_LOCAL_NED_DATA {
25672    #[doc = "Timestamp (time since system boot)."]
25673    pub time_boot_ms: u32,
25674    #[doc = "X Position in NED frame"]
25675    pub x: f32,
25676    #[doc = "Y Position in NED frame"]
25677    pub y: f32,
25678    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25679    pub z: f32,
25680    #[doc = "X velocity in NED frame"]
25681    pub vx: f32,
25682    #[doc = "Y velocity in NED frame"]
25683    pub vy: f32,
25684    #[doc = "Z velocity in NED frame"]
25685    pub vz: f32,
25686    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25687    pub afx: f32,
25688    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25689    pub afy: f32,
25690    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25691    pub afz: f32,
25692    #[doc = "yaw setpoint"]
25693    pub yaw: f32,
25694    #[doc = "yaw rate setpoint"]
25695    pub yaw_rate: f32,
25696    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25697    pub type_mask: PositionTargetTypemask,
25698    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25699    pub coordinate_frame: MavFrame,
25700}
25701impl POSITION_TARGET_LOCAL_NED_DATA {
25702    pub const ENCODED_LEN: usize = 51usize;
25703    pub const DEFAULT: Self = Self {
25704        time_boot_ms: 0_u32,
25705        x: 0.0_f32,
25706        y: 0.0_f32,
25707        z: 0.0_f32,
25708        vx: 0.0_f32,
25709        vy: 0.0_f32,
25710        vz: 0.0_f32,
25711        afx: 0.0_f32,
25712        afy: 0.0_f32,
25713        afz: 0.0_f32,
25714        yaw: 0.0_f32,
25715        yaw_rate: 0.0_f32,
25716        type_mask: PositionTargetTypemask::DEFAULT,
25717        coordinate_frame: MavFrame::DEFAULT,
25718    };
25719    #[cfg(feature = "arbitrary")]
25720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25721        use arbitrary::{Arbitrary, Unstructured};
25722        let mut buf = [0u8; 1024];
25723        rng.fill_bytes(&mut buf);
25724        let mut unstructured = Unstructured::new(&buf);
25725        Self::arbitrary(&mut unstructured).unwrap_or_default()
25726    }
25727}
25728impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25729    fn default() -> Self {
25730        Self::DEFAULT.clone()
25731    }
25732}
25733impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25734    type Message = MavMessage;
25735    const ID: u32 = 85u32;
25736    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25737    const EXTRA_CRC: u8 = 140u8;
25738    const ENCODED_LEN: usize = 51usize;
25739    fn deser(
25740        _version: MavlinkVersion,
25741        __input: &[u8],
25742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25743        let avail_len = __input.len();
25744        let mut payload_buf = [0; Self::ENCODED_LEN];
25745        let mut buf = if avail_len < Self::ENCODED_LEN {
25746            payload_buf[0..avail_len].copy_from_slice(__input);
25747            Bytes::new(&payload_buf)
25748        } else {
25749            Bytes::new(__input)
25750        };
25751        let mut __struct = Self::default();
25752        __struct.time_boot_ms = buf.get_u32_le();
25753        __struct.x = buf.get_f32_le();
25754        __struct.y = buf.get_f32_le();
25755        __struct.z = buf.get_f32_le();
25756        __struct.vx = buf.get_f32_le();
25757        __struct.vy = buf.get_f32_le();
25758        __struct.vz = buf.get_f32_le();
25759        __struct.afx = buf.get_f32_le();
25760        __struct.afy = buf.get_f32_le();
25761        __struct.afz = buf.get_f32_le();
25762        __struct.yaw = buf.get_f32_le();
25763        __struct.yaw_rate = buf.get_f32_le();
25764        let tmp = buf.get_u16_le();
25765        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25766            ::mavlink_core::error::ParserError::InvalidFlag {
25767                flag_type: "PositionTargetTypemask",
25768                value: tmp as u64,
25769            },
25770        )?;
25771        let tmp = buf.get_u8();
25772        __struct.coordinate_frame =
25773            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25774                enum_type: "MavFrame",
25775                value: tmp as u64,
25776            })?;
25777        Ok(__struct)
25778    }
25779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25780        let mut __tmp = BytesMut::new(bytes);
25781        #[allow(clippy::absurd_extreme_comparisons)]
25782        #[allow(unused_comparisons)]
25783        if __tmp.remaining() < Self::ENCODED_LEN {
25784            panic!(
25785                "buffer is too small (need {} bytes, but got {})",
25786                Self::ENCODED_LEN,
25787                __tmp.remaining(),
25788            )
25789        }
25790        __tmp.put_u32_le(self.time_boot_ms);
25791        __tmp.put_f32_le(self.x);
25792        __tmp.put_f32_le(self.y);
25793        __tmp.put_f32_le(self.z);
25794        __tmp.put_f32_le(self.vx);
25795        __tmp.put_f32_le(self.vy);
25796        __tmp.put_f32_le(self.vz);
25797        __tmp.put_f32_le(self.afx);
25798        __tmp.put_f32_le(self.afy);
25799        __tmp.put_f32_le(self.afz);
25800        __tmp.put_f32_le(self.yaw);
25801        __tmp.put_f32_le(self.yaw_rate);
25802        __tmp.put_u16_le(self.type_mask.bits());
25803        __tmp.put_u8(self.coordinate_frame as u8);
25804        if matches!(version, MavlinkVersion::V2) {
25805            let len = __tmp.len();
25806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25807        } else {
25808            __tmp.len()
25809        }
25810    }
25811}
25812#[doc = "Power supply status."]
25813#[doc = ""]
25814#[doc = "ID: 125"]
25815#[derive(Debug, Clone, PartialEq)]
25816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25818#[cfg_attr(feature = "ts", derive(TS))]
25819#[cfg_attr(feature = "ts", ts(export))]
25820pub struct POWER_STATUS_DATA {
25821    #[doc = "5V rail voltage."]
25822    pub Vcc: u16,
25823    #[doc = "Servo rail voltage."]
25824    pub Vservo: u16,
25825    #[doc = "Bitmap of power supply status flags."]
25826    pub flags: MavPowerStatus,
25827}
25828impl POWER_STATUS_DATA {
25829    pub const ENCODED_LEN: usize = 6usize;
25830    pub const DEFAULT: Self = Self {
25831        Vcc: 0_u16,
25832        Vservo: 0_u16,
25833        flags: MavPowerStatus::DEFAULT,
25834    };
25835    #[cfg(feature = "arbitrary")]
25836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25837        use arbitrary::{Arbitrary, Unstructured};
25838        let mut buf = [0u8; 1024];
25839        rng.fill_bytes(&mut buf);
25840        let mut unstructured = Unstructured::new(&buf);
25841        Self::arbitrary(&mut unstructured).unwrap_or_default()
25842    }
25843}
25844impl Default for POWER_STATUS_DATA {
25845    fn default() -> Self {
25846        Self::DEFAULT.clone()
25847    }
25848}
25849impl MessageData for POWER_STATUS_DATA {
25850    type Message = MavMessage;
25851    const ID: u32 = 125u32;
25852    const NAME: &'static str = "POWER_STATUS";
25853    const EXTRA_CRC: u8 = 203u8;
25854    const ENCODED_LEN: usize = 6usize;
25855    fn deser(
25856        _version: MavlinkVersion,
25857        __input: &[u8],
25858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25859        let avail_len = __input.len();
25860        let mut payload_buf = [0; Self::ENCODED_LEN];
25861        let mut buf = if avail_len < Self::ENCODED_LEN {
25862            payload_buf[0..avail_len].copy_from_slice(__input);
25863            Bytes::new(&payload_buf)
25864        } else {
25865            Bytes::new(__input)
25866        };
25867        let mut __struct = Self::default();
25868        __struct.Vcc = buf.get_u16_le();
25869        __struct.Vservo = buf.get_u16_le();
25870        let tmp = buf.get_u16_le();
25871        __struct.flags = MavPowerStatus::from_bits(tmp).ok_or(
25872            ::mavlink_core::error::ParserError::InvalidFlag {
25873                flag_type: "MavPowerStatus",
25874                value: tmp as u64,
25875            },
25876        )?;
25877        Ok(__struct)
25878    }
25879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25880        let mut __tmp = BytesMut::new(bytes);
25881        #[allow(clippy::absurd_extreme_comparisons)]
25882        #[allow(unused_comparisons)]
25883        if __tmp.remaining() < Self::ENCODED_LEN {
25884            panic!(
25885                "buffer is too small (need {} bytes, but got {})",
25886                Self::ENCODED_LEN,
25887                __tmp.remaining(),
25888            )
25889        }
25890        __tmp.put_u16_le(self.Vcc);
25891        __tmp.put_u16_le(self.Vservo);
25892        __tmp.put_u16_le(self.flags.bits());
25893        if matches!(version, MavlinkVersion::V2) {
25894            let len = __tmp.len();
25895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25896        } else {
25897            __tmp.len()
25898        }
25899    }
25900}
25901#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25902#[doc = ""]
25903#[doc = "ID: 300"]
25904#[derive(Debug, Clone, PartialEq)]
25905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25907#[cfg_attr(feature = "ts", derive(TS))]
25908#[cfg_attr(feature = "ts", ts(export))]
25909pub struct PROTOCOL_VERSION_DATA {
25910    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25911    pub version: u16,
25912    #[doc = "Minimum MAVLink version supported"]
25913    pub min_version: u16,
25914    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25915    pub max_version: u16,
25916    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25917    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25918    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25919    pub spec_version_hash: [u8; 8],
25920    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25922    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25923    pub library_version_hash: [u8; 8],
25924}
25925impl PROTOCOL_VERSION_DATA {
25926    pub const ENCODED_LEN: usize = 22usize;
25927    pub const DEFAULT: Self = Self {
25928        version: 0_u16,
25929        min_version: 0_u16,
25930        max_version: 0_u16,
25931        spec_version_hash: [0_u8; 8usize],
25932        library_version_hash: [0_u8; 8usize],
25933    };
25934    #[cfg(feature = "arbitrary")]
25935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25936        use arbitrary::{Arbitrary, Unstructured};
25937        let mut buf = [0u8; 1024];
25938        rng.fill_bytes(&mut buf);
25939        let mut unstructured = Unstructured::new(&buf);
25940        Self::arbitrary(&mut unstructured).unwrap_or_default()
25941    }
25942}
25943impl Default for PROTOCOL_VERSION_DATA {
25944    fn default() -> Self {
25945        Self::DEFAULT.clone()
25946    }
25947}
25948impl MessageData for PROTOCOL_VERSION_DATA {
25949    type Message = MavMessage;
25950    const ID: u32 = 300u32;
25951    const NAME: &'static str = "PROTOCOL_VERSION";
25952    const EXTRA_CRC: u8 = 217u8;
25953    const ENCODED_LEN: usize = 22usize;
25954    fn deser(
25955        _version: MavlinkVersion,
25956        __input: &[u8],
25957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25958        let avail_len = __input.len();
25959        let mut payload_buf = [0; Self::ENCODED_LEN];
25960        let mut buf = if avail_len < Self::ENCODED_LEN {
25961            payload_buf[0..avail_len].copy_from_slice(__input);
25962            Bytes::new(&payload_buf)
25963        } else {
25964            Bytes::new(__input)
25965        };
25966        let mut __struct = Self::default();
25967        __struct.version = buf.get_u16_le();
25968        __struct.min_version = buf.get_u16_le();
25969        __struct.max_version = buf.get_u16_le();
25970        for v in &mut __struct.spec_version_hash {
25971            let val = buf.get_u8();
25972            *v = val;
25973        }
25974        for v in &mut __struct.library_version_hash {
25975            let val = buf.get_u8();
25976            *v = val;
25977        }
25978        Ok(__struct)
25979    }
25980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25981        let mut __tmp = BytesMut::new(bytes);
25982        #[allow(clippy::absurd_extreme_comparisons)]
25983        #[allow(unused_comparisons)]
25984        if __tmp.remaining() < Self::ENCODED_LEN {
25985            panic!(
25986                "buffer is too small (need {} bytes, but got {})",
25987                Self::ENCODED_LEN,
25988                __tmp.remaining(),
25989            )
25990        }
25991        __tmp.put_u16_le(self.version);
25992        __tmp.put_u16_le(self.min_version);
25993        __tmp.put_u16_le(self.max_version);
25994        for val in &self.spec_version_hash {
25995            __tmp.put_u8(*val);
25996        }
25997        for val in &self.library_version_hash {
25998            __tmp.put_u8(*val);
25999        }
26000        if matches!(version, MavlinkVersion::V2) {
26001            let len = __tmp.len();
26002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26003        } else {
26004            __tmp.len()
26005        }
26006    }
26007}
26008#[doc = "Status generated by radio and injected into MAVLink stream."]
26009#[doc = ""]
26010#[doc = "ID: 109"]
26011#[derive(Debug, Clone, PartialEq)]
26012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26014#[cfg_attr(feature = "ts", derive(TS))]
26015#[cfg_attr(feature = "ts", ts(export))]
26016pub struct RADIO_STATUS_DATA {
26017    #[doc = "Count of radio packet receive errors (since boot)."]
26018    pub rxerrors: u16,
26019    #[doc = "Count of error corrected radio packets (since boot)."]
26020    pub fixed: u16,
26021    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26022    pub rssi: u8,
26023    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26024    pub remrssi: u8,
26025    #[doc = "Remaining free transmitter buffer space."]
26026    pub txbuf: u8,
26027    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26028    pub noise: u8,
26029    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26030    pub remnoise: u8,
26031}
26032impl RADIO_STATUS_DATA {
26033    pub const ENCODED_LEN: usize = 9usize;
26034    pub const DEFAULT: Self = Self {
26035        rxerrors: 0_u16,
26036        fixed: 0_u16,
26037        rssi: 0_u8,
26038        remrssi: 0_u8,
26039        txbuf: 0_u8,
26040        noise: 0_u8,
26041        remnoise: 0_u8,
26042    };
26043    #[cfg(feature = "arbitrary")]
26044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26045        use arbitrary::{Arbitrary, Unstructured};
26046        let mut buf = [0u8; 1024];
26047        rng.fill_bytes(&mut buf);
26048        let mut unstructured = Unstructured::new(&buf);
26049        Self::arbitrary(&mut unstructured).unwrap_or_default()
26050    }
26051}
26052impl Default for RADIO_STATUS_DATA {
26053    fn default() -> Self {
26054        Self::DEFAULT.clone()
26055    }
26056}
26057impl MessageData for RADIO_STATUS_DATA {
26058    type Message = MavMessage;
26059    const ID: u32 = 109u32;
26060    const NAME: &'static str = "RADIO_STATUS";
26061    const EXTRA_CRC: u8 = 185u8;
26062    const ENCODED_LEN: usize = 9usize;
26063    fn deser(
26064        _version: MavlinkVersion,
26065        __input: &[u8],
26066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26067        let avail_len = __input.len();
26068        let mut payload_buf = [0; Self::ENCODED_LEN];
26069        let mut buf = if avail_len < Self::ENCODED_LEN {
26070            payload_buf[0..avail_len].copy_from_slice(__input);
26071            Bytes::new(&payload_buf)
26072        } else {
26073            Bytes::new(__input)
26074        };
26075        let mut __struct = Self::default();
26076        __struct.rxerrors = buf.get_u16_le();
26077        __struct.fixed = buf.get_u16_le();
26078        __struct.rssi = buf.get_u8();
26079        __struct.remrssi = buf.get_u8();
26080        __struct.txbuf = buf.get_u8();
26081        __struct.noise = buf.get_u8();
26082        __struct.remnoise = buf.get_u8();
26083        Ok(__struct)
26084    }
26085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26086        let mut __tmp = BytesMut::new(bytes);
26087        #[allow(clippy::absurd_extreme_comparisons)]
26088        #[allow(unused_comparisons)]
26089        if __tmp.remaining() < Self::ENCODED_LEN {
26090            panic!(
26091                "buffer is too small (need {} bytes, but got {})",
26092                Self::ENCODED_LEN,
26093                __tmp.remaining(),
26094            )
26095        }
26096        __tmp.put_u16_le(self.rxerrors);
26097        __tmp.put_u16_le(self.fixed);
26098        __tmp.put_u8(self.rssi);
26099        __tmp.put_u8(self.remrssi);
26100        __tmp.put_u8(self.txbuf);
26101        __tmp.put_u8(self.noise);
26102        __tmp.put_u8(self.remnoise);
26103        if matches!(version, MavlinkVersion::V2) {
26104            let len = __tmp.len();
26105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26106        } else {
26107            __tmp.len()
26108        }
26109    }
26110}
26111#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
26112#[doc = ""]
26113#[doc = "ID: 27"]
26114#[derive(Debug, Clone, PartialEq)]
26115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26117#[cfg_attr(feature = "ts", derive(TS))]
26118#[cfg_attr(feature = "ts", ts(export))]
26119pub struct RAW_IMU_DATA {
26120    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26121    pub time_usec: u64,
26122    #[doc = "X acceleration (raw)"]
26123    pub xacc: i16,
26124    #[doc = "Y acceleration (raw)"]
26125    pub yacc: i16,
26126    #[doc = "Z acceleration (raw)"]
26127    pub zacc: i16,
26128    #[doc = "Angular speed around X axis (raw)"]
26129    pub xgyro: i16,
26130    #[doc = "Angular speed around Y axis (raw)"]
26131    pub ygyro: i16,
26132    #[doc = "Angular speed around Z axis (raw)"]
26133    pub zgyro: i16,
26134    #[doc = "X Magnetic field (raw)"]
26135    pub xmag: i16,
26136    #[doc = "Y Magnetic field (raw)"]
26137    pub ymag: i16,
26138    #[doc = "Z Magnetic field (raw)"]
26139    pub zmag: i16,
26140    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
26141    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26142    pub id: u8,
26143    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26144    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26145    pub temperature: i16,
26146}
26147impl RAW_IMU_DATA {
26148    pub const ENCODED_LEN: usize = 29usize;
26149    pub const DEFAULT: Self = Self {
26150        time_usec: 0_u64,
26151        xacc: 0_i16,
26152        yacc: 0_i16,
26153        zacc: 0_i16,
26154        xgyro: 0_i16,
26155        ygyro: 0_i16,
26156        zgyro: 0_i16,
26157        xmag: 0_i16,
26158        ymag: 0_i16,
26159        zmag: 0_i16,
26160        id: 0_u8,
26161        temperature: 0_i16,
26162    };
26163    #[cfg(feature = "arbitrary")]
26164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26165        use arbitrary::{Arbitrary, Unstructured};
26166        let mut buf = [0u8; 1024];
26167        rng.fill_bytes(&mut buf);
26168        let mut unstructured = Unstructured::new(&buf);
26169        Self::arbitrary(&mut unstructured).unwrap_or_default()
26170    }
26171}
26172impl Default for RAW_IMU_DATA {
26173    fn default() -> Self {
26174        Self::DEFAULT.clone()
26175    }
26176}
26177impl MessageData for RAW_IMU_DATA {
26178    type Message = MavMessage;
26179    const ID: u32 = 27u32;
26180    const NAME: &'static str = "RAW_IMU";
26181    const EXTRA_CRC: u8 = 144u8;
26182    const ENCODED_LEN: usize = 29usize;
26183    fn deser(
26184        _version: MavlinkVersion,
26185        __input: &[u8],
26186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26187        let avail_len = __input.len();
26188        let mut payload_buf = [0; Self::ENCODED_LEN];
26189        let mut buf = if avail_len < Self::ENCODED_LEN {
26190            payload_buf[0..avail_len].copy_from_slice(__input);
26191            Bytes::new(&payload_buf)
26192        } else {
26193            Bytes::new(__input)
26194        };
26195        let mut __struct = Self::default();
26196        __struct.time_usec = buf.get_u64_le();
26197        __struct.xacc = buf.get_i16_le();
26198        __struct.yacc = buf.get_i16_le();
26199        __struct.zacc = buf.get_i16_le();
26200        __struct.xgyro = buf.get_i16_le();
26201        __struct.ygyro = buf.get_i16_le();
26202        __struct.zgyro = buf.get_i16_le();
26203        __struct.xmag = buf.get_i16_le();
26204        __struct.ymag = buf.get_i16_le();
26205        __struct.zmag = buf.get_i16_le();
26206        __struct.id = buf.get_u8();
26207        __struct.temperature = buf.get_i16_le();
26208        Ok(__struct)
26209    }
26210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26211        let mut __tmp = BytesMut::new(bytes);
26212        #[allow(clippy::absurd_extreme_comparisons)]
26213        #[allow(unused_comparisons)]
26214        if __tmp.remaining() < Self::ENCODED_LEN {
26215            panic!(
26216                "buffer is too small (need {} bytes, but got {})",
26217                Self::ENCODED_LEN,
26218                __tmp.remaining(),
26219            )
26220        }
26221        __tmp.put_u64_le(self.time_usec);
26222        __tmp.put_i16_le(self.xacc);
26223        __tmp.put_i16_le(self.yacc);
26224        __tmp.put_i16_le(self.zacc);
26225        __tmp.put_i16_le(self.xgyro);
26226        __tmp.put_i16_le(self.ygyro);
26227        __tmp.put_i16_le(self.zgyro);
26228        __tmp.put_i16_le(self.xmag);
26229        __tmp.put_i16_le(self.ymag);
26230        __tmp.put_i16_le(self.zmag);
26231        if matches!(version, MavlinkVersion::V2) {
26232            __tmp.put_u8(self.id);
26233            __tmp.put_i16_le(self.temperature);
26234            let len = __tmp.len();
26235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26236        } else {
26237            __tmp.len()
26238        }
26239    }
26240}
26241#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26242#[doc = ""]
26243#[doc = "ID: 28"]
26244#[derive(Debug, Clone, PartialEq)]
26245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26247#[cfg_attr(feature = "ts", derive(TS))]
26248#[cfg_attr(feature = "ts", ts(export))]
26249pub struct RAW_PRESSURE_DATA {
26250    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26251    pub time_usec: u64,
26252    #[doc = "Absolute pressure (raw)"]
26253    pub press_abs: i16,
26254    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26255    pub press_diff1: i16,
26256    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26257    pub press_diff2: i16,
26258    #[doc = "Raw Temperature measurement (raw)"]
26259    pub temperature: i16,
26260}
26261impl RAW_PRESSURE_DATA {
26262    pub const ENCODED_LEN: usize = 16usize;
26263    pub const DEFAULT: Self = Self {
26264        time_usec: 0_u64,
26265        press_abs: 0_i16,
26266        press_diff1: 0_i16,
26267        press_diff2: 0_i16,
26268        temperature: 0_i16,
26269    };
26270    #[cfg(feature = "arbitrary")]
26271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26272        use arbitrary::{Arbitrary, Unstructured};
26273        let mut buf = [0u8; 1024];
26274        rng.fill_bytes(&mut buf);
26275        let mut unstructured = Unstructured::new(&buf);
26276        Self::arbitrary(&mut unstructured).unwrap_or_default()
26277    }
26278}
26279impl Default for RAW_PRESSURE_DATA {
26280    fn default() -> Self {
26281        Self::DEFAULT.clone()
26282    }
26283}
26284impl MessageData for RAW_PRESSURE_DATA {
26285    type Message = MavMessage;
26286    const ID: u32 = 28u32;
26287    const NAME: &'static str = "RAW_PRESSURE";
26288    const EXTRA_CRC: u8 = 67u8;
26289    const ENCODED_LEN: usize = 16usize;
26290    fn deser(
26291        _version: MavlinkVersion,
26292        __input: &[u8],
26293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26294        let avail_len = __input.len();
26295        let mut payload_buf = [0; Self::ENCODED_LEN];
26296        let mut buf = if avail_len < Self::ENCODED_LEN {
26297            payload_buf[0..avail_len].copy_from_slice(__input);
26298            Bytes::new(&payload_buf)
26299        } else {
26300            Bytes::new(__input)
26301        };
26302        let mut __struct = Self::default();
26303        __struct.time_usec = buf.get_u64_le();
26304        __struct.press_abs = buf.get_i16_le();
26305        __struct.press_diff1 = buf.get_i16_le();
26306        __struct.press_diff2 = buf.get_i16_le();
26307        __struct.temperature = buf.get_i16_le();
26308        Ok(__struct)
26309    }
26310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26311        let mut __tmp = BytesMut::new(bytes);
26312        #[allow(clippy::absurd_extreme_comparisons)]
26313        #[allow(unused_comparisons)]
26314        if __tmp.remaining() < Self::ENCODED_LEN {
26315            panic!(
26316                "buffer is too small (need {} bytes, but got {})",
26317                Self::ENCODED_LEN,
26318                __tmp.remaining(),
26319            )
26320        }
26321        __tmp.put_u64_le(self.time_usec);
26322        __tmp.put_i16_le(self.press_abs);
26323        __tmp.put_i16_le(self.press_diff1);
26324        __tmp.put_i16_le(self.press_diff2);
26325        __tmp.put_i16_le(self.temperature);
26326        if matches!(version, MavlinkVersion::V2) {
26327            let len = __tmp.len();
26328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26329        } else {
26330            __tmp.len()
26331        }
26332    }
26333}
26334#[doc = "RPM sensor data message."]
26335#[doc = ""]
26336#[doc = "ID: 339"]
26337#[derive(Debug, Clone, PartialEq)]
26338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26340#[cfg_attr(feature = "ts", derive(TS))]
26341#[cfg_attr(feature = "ts", ts(export))]
26342pub struct RAW_RPM_DATA {
26343    #[doc = "Indicated rate"]
26344    pub frequency: f32,
26345    #[doc = "Index of this RPM sensor (0-indexed)"]
26346    pub index: u8,
26347}
26348impl RAW_RPM_DATA {
26349    pub const ENCODED_LEN: usize = 5usize;
26350    pub const DEFAULT: Self = Self {
26351        frequency: 0.0_f32,
26352        index: 0_u8,
26353    };
26354    #[cfg(feature = "arbitrary")]
26355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26356        use arbitrary::{Arbitrary, Unstructured};
26357        let mut buf = [0u8; 1024];
26358        rng.fill_bytes(&mut buf);
26359        let mut unstructured = Unstructured::new(&buf);
26360        Self::arbitrary(&mut unstructured).unwrap_or_default()
26361    }
26362}
26363impl Default for RAW_RPM_DATA {
26364    fn default() -> Self {
26365        Self::DEFAULT.clone()
26366    }
26367}
26368impl MessageData for RAW_RPM_DATA {
26369    type Message = MavMessage;
26370    const ID: u32 = 339u32;
26371    const NAME: &'static str = "RAW_RPM";
26372    const EXTRA_CRC: u8 = 199u8;
26373    const ENCODED_LEN: usize = 5usize;
26374    fn deser(
26375        _version: MavlinkVersion,
26376        __input: &[u8],
26377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26378        let avail_len = __input.len();
26379        let mut payload_buf = [0; Self::ENCODED_LEN];
26380        let mut buf = if avail_len < Self::ENCODED_LEN {
26381            payload_buf[0..avail_len].copy_from_slice(__input);
26382            Bytes::new(&payload_buf)
26383        } else {
26384            Bytes::new(__input)
26385        };
26386        let mut __struct = Self::default();
26387        __struct.frequency = buf.get_f32_le();
26388        __struct.index = buf.get_u8();
26389        Ok(__struct)
26390    }
26391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26392        let mut __tmp = BytesMut::new(bytes);
26393        #[allow(clippy::absurd_extreme_comparisons)]
26394        #[allow(unused_comparisons)]
26395        if __tmp.remaining() < Self::ENCODED_LEN {
26396            panic!(
26397                "buffer is too small (need {} bytes, but got {})",
26398                Self::ENCODED_LEN,
26399                __tmp.remaining(),
26400            )
26401        }
26402        __tmp.put_f32_le(self.frequency);
26403        __tmp.put_u8(self.index);
26404        if matches!(version, MavlinkVersion::V2) {
26405            let len = __tmp.len();
26406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26407        } else {
26408            __tmp.len()
26409        }
26410    }
26411}
26412#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26413#[doc = ""]
26414#[doc = "ID: 65"]
26415#[derive(Debug, Clone, PartialEq)]
26416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26418#[cfg_attr(feature = "ts", derive(TS))]
26419#[cfg_attr(feature = "ts", ts(export))]
26420pub struct RC_CHANNELS_DATA {
26421    #[doc = "Timestamp (time since system boot)."]
26422    pub time_boot_ms: u32,
26423    #[doc = "RC channel 1 value."]
26424    pub chan1_raw: u16,
26425    #[doc = "RC channel 2 value."]
26426    pub chan2_raw: u16,
26427    #[doc = "RC channel 3 value."]
26428    pub chan3_raw: u16,
26429    #[doc = "RC channel 4 value."]
26430    pub chan4_raw: u16,
26431    #[doc = "RC channel 5 value."]
26432    pub chan5_raw: u16,
26433    #[doc = "RC channel 6 value."]
26434    pub chan6_raw: u16,
26435    #[doc = "RC channel 7 value."]
26436    pub chan7_raw: u16,
26437    #[doc = "RC channel 8 value."]
26438    pub chan8_raw: u16,
26439    #[doc = "RC channel 9 value."]
26440    pub chan9_raw: u16,
26441    #[doc = "RC channel 10 value."]
26442    pub chan10_raw: u16,
26443    #[doc = "RC channel 11 value."]
26444    pub chan11_raw: u16,
26445    #[doc = "RC channel 12 value."]
26446    pub chan12_raw: u16,
26447    #[doc = "RC channel 13 value."]
26448    pub chan13_raw: u16,
26449    #[doc = "RC channel 14 value."]
26450    pub chan14_raw: u16,
26451    #[doc = "RC channel 15 value."]
26452    pub chan15_raw: u16,
26453    #[doc = "RC channel 16 value."]
26454    pub chan16_raw: u16,
26455    #[doc = "RC channel 17 value."]
26456    pub chan17_raw: u16,
26457    #[doc = "RC channel 18 value."]
26458    pub chan18_raw: u16,
26459    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26460    pub chancount: u8,
26461    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26462    pub rssi: u8,
26463}
26464impl RC_CHANNELS_DATA {
26465    pub const ENCODED_LEN: usize = 42usize;
26466    pub const DEFAULT: Self = Self {
26467        time_boot_ms: 0_u32,
26468        chan1_raw: 0_u16,
26469        chan2_raw: 0_u16,
26470        chan3_raw: 0_u16,
26471        chan4_raw: 0_u16,
26472        chan5_raw: 0_u16,
26473        chan6_raw: 0_u16,
26474        chan7_raw: 0_u16,
26475        chan8_raw: 0_u16,
26476        chan9_raw: 0_u16,
26477        chan10_raw: 0_u16,
26478        chan11_raw: 0_u16,
26479        chan12_raw: 0_u16,
26480        chan13_raw: 0_u16,
26481        chan14_raw: 0_u16,
26482        chan15_raw: 0_u16,
26483        chan16_raw: 0_u16,
26484        chan17_raw: 0_u16,
26485        chan18_raw: 0_u16,
26486        chancount: 0_u8,
26487        rssi: 0_u8,
26488    };
26489    #[cfg(feature = "arbitrary")]
26490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26491        use arbitrary::{Arbitrary, Unstructured};
26492        let mut buf = [0u8; 1024];
26493        rng.fill_bytes(&mut buf);
26494        let mut unstructured = Unstructured::new(&buf);
26495        Self::arbitrary(&mut unstructured).unwrap_or_default()
26496    }
26497}
26498impl Default for RC_CHANNELS_DATA {
26499    fn default() -> Self {
26500        Self::DEFAULT.clone()
26501    }
26502}
26503impl MessageData for RC_CHANNELS_DATA {
26504    type Message = MavMessage;
26505    const ID: u32 = 65u32;
26506    const NAME: &'static str = "RC_CHANNELS";
26507    const EXTRA_CRC: u8 = 118u8;
26508    const ENCODED_LEN: usize = 42usize;
26509    fn deser(
26510        _version: MavlinkVersion,
26511        __input: &[u8],
26512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26513        let avail_len = __input.len();
26514        let mut payload_buf = [0; Self::ENCODED_LEN];
26515        let mut buf = if avail_len < Self::ENCODED_LEN {
26516            payload_buf[0..avail_len].copy_from_slice(__input);
26517            Bytes::new(&payload_buf)
26518        } else {
26519            Bytes::new(__input)
26520        };
26521        let mut __struct = Self::default();
26522        __struct.time_boot_ms = buf.get_u32_le();
26523        __struct.chan1_raw = buf.get_u16_le();
26524        __struct.chan2_raw = buf.get_u16_le();
26525        __struct.chan3_raw = buf.get_u16_le();
26526        __struct.chan4_raw = buf.get_u16_le();
26527        __struct.chan5_raw = buf.get_u16_le();
26528        __struct.chan6_raw = buf.get_u16_le();
26529        __struct.chan7_raw = buf.get_u16_le();
26530        __struct.chan8_raw = buf.get_u16_le();
26531        __struct.chan9_raw = buf.get_u16_le();
26532        __struct.chan10_raw = buf.get_u16_le();
26533        __struct.chan11_raw = buf.get_u16_le();
26534        __struct.chan12_raw = buf.get_u16_le();
26535        __struct.chan13_raw = buf.get_u16_le();
26536        __struct.chan14_raw = buf.get_u16_le();
26537        __struct.chan15_raw = buf.get_u16_le();
26538        __struct.chan16_raw = buf.get_u16_le();
26539        __struct.chan17_raw = buf.get_u16_le();
26540        __struct.chan18_raw = buf.get_u16_le();
26541        __struct.chancount = buf.get_u8();
26542        __struct.rssi = buf.get_u8();
26543        Ok(__struct)
26544    }
26545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26546        let mut __tmp = BytesMut::new(bytes);
26547        #[allow(clippy::absurd_extreme_comparisons)]
26548        #[allow(unused_comparisons)]
26549        if __tmp.remaining() < Self::ENCODED_LEN {
26550            panic!(
26551                "buffer is too small (need {} bytes, but got {})",
26552                Self::ENCODED_LEN,
26553                __tmp.remaining(),
26554            )
26555        }
26556        __tmp.put_u32_le(self.time_boot_ms);
26557        __tmp.put_u16_le(self.chan1_raw);
26558        __tmp.put_u16_le(self.chan2_raw);
26559        __tmp.put_u16_le(self.chan3_raw);
26560        __tmp.put_u16_le(self.chan4_raw);
26561        __tmp.put_u16_le(self.chan5_raw);
26562        __tmp.put_u16_le(self.chan6_raw);
26563        __tmp.put_u16_le(self.chan7_raw);
26564        __tmp.put_u16_le(self.chan8_raw);
26565        __tmp.put_u16_le(self.chan9_raw);
26566        __tmp.put_u16_le(self.chan10_raw);
26567        __tmp.put_u16_le(self.chan11_raw);
26568        __tmp.put_u16_le(self.chan12_raw);
26569        __tmp.put_u16_le(self.chan13_raw);
26570        __tmp.put_u16_le(self.chan14_raw);
26571        __tmp.put_u16_le(self.chan15_raw);
26572        __tmp.put_u16_le(self.chan16_raw);
26573        __tmp.put_u16_le(self.chan17_raw);
26574        __tmp.put_u16_le(self.chan18_raw);
26575        __tmp.put_u8(self.chancount);
26576        __tmp.put_u8(self.rssi);
26577        if matches!(version, MavlinkVersion::V2) {
26578            let len = __tmp.len();
26579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26580        } else {
26581            __tmp.len()
26582        }
26583    }
26584}
26585#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26586#[doc = ""]
26587#[doc = "ID: 70"]
26588#[derive(Debug, Clone, PartialEq)]
26589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26591#[cfg_attr(feature = "ts", derive(TS))]
26592#[cfg_attr(feature = "ts", ts(export))]
26593pub struct RC_CHANNELS_OVERRIDE_DATA {
26594    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26595    pub chan1_raw: u16,
26596    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26597    pub chan2_raw: u16,
26598    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26599    pub chan3_raw: u16,
26600    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26601    pub chan4_raw: u16,
26602    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26603    pub chan5_raw: u16,
26604    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26605    pub chan6_raw: u16,
26606    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26607    pub chan7_raw: u16,
26608    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26609    pub chan8_raw: u16,
26610    #[doc = "System ID"]
26611    pub target_system: u8,
26612    #[doc = "Component ID"]
26613    pub target_component: u8,
26614    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26616    pub chan9_raw: u16,
26617    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26619    pub chan10_raw: u16,
26620    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26621    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26622    pub chan11_raw: u16,
26623    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26624    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26625    pub chan12_raw: u16,
26626    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26627    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26628    pub chan13_raw: u16,
26629    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26630    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26631    pub chan14_raw: u16,
26632    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26633    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26634    pub chan15_raw: u16,
26635    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26636    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26637    pub chan16_raw: u16,
26638    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26640    pub chan17_raw: u16,
26641    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26643    pub chan18_raw: u16,
26644}
26645impl RC_CHANNELS_OVERRIDE_DATA {
26646    pub const ENCODED_LEN: usize = 38usize;
26647    pub const DEFAULT: Self = Self {
26648        chan1_raw: 0_u16,
26649        chan2_raw: 0_u16,
26650        chan3_raw: 0_u16,
26651        chan4_raw: 0_u16,
26652        chan5_raw: 0_u16,
26653        chan6_raw: 0_u16,
26654        chan7_raw: 0_u16,
26655        chan8_raw: 0_u16,
26656        target_system: 0_u8,
26657        target_component: 0_u8,
26658        chan9_raw: 0_u16,
26659        chan10_raw: 0_u16,
26660        chan11_raw: 0_u16,
26661        chan12_raw: 0_u16,
26662        chan13_raw: 0_u16,
26663        chan14_raw: 0_u16,
26664        chan15_raw: 0_u16,
26665        chan16_raw: 0_u16,
26666        chan17_raw: 0_u16,
26667        chan18_raw: 0_u16,
26668    };
26669    #[cfg(feature = "arbitrary")]
26670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26671        use arbitrary::{Arbitrary, Unstructured};
26672        let mut buf = [0u8; 1024];
26673        rng.fill_bytes(&mut buf);
26674        let mut unstructured = Unstructured::new(&buf);
26675        Self::arbitrary(&mut unstructured).unwrap_or_default()
26676    }
26677}
26678impl Default for RC_CHANNELS_OVERRIDE_DATA {
26679    fn default() -> Self {
26680        Self::DEFAULT.clone()
26681    }
26682}
26683impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26684    type Message = MavMessage;
26685    const ID: u32 = 70u32;
26686    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26687    const EXTRA_CRC: u8 = 124u8;
26688    const ENCODED_LEN: usize = 38usize;
26689    fn deser(
26690        _version: MavlinkVersion,
26691        __input: &[u8],
26692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26693        let avail_len = __input.len();
26694        let mut payload_buf = [0; Self::ENCODED_LEN];
26695        let mut buf = if avail_len < Self::ENCODED_LEN {
26696            payload_buf[0..avail_len].copy_from_slice(__input);
26697            Bytes::new(&payload_buf)
26698        } else {
26699            Bytes::new(__input)
26700        };
26701        let mut __struct = Self::default();
26702        __struct.chan1_raw = buf.get_u16_le();
26703        __struct.chan2_raw = buf.get_u16_le();
26704        __struct.chan3_raw = buf.get_u16_le();
26705        __struct.chan4_raw = buf.get_u16_le();
26706        __struct.chan5_raw = buf.get_u16_le();
26707        __struct.chan6_raw = buf.get_u16_le();
26708        __struct.chan7_raw = buf.get_u16_le();
26709        __struct.chan8_raw = buf.get_u16_le();
26710        __struct.target_system = buf.get_u8();
26711        __struct.target_component = buf.get_u8();
26712        __struct.chan9_raw = buf.get_u16_le();
26713        __struct.chan10_raw = buf.get_u16_le();
26714        __struct.chan11_raw = buf.get_u16_le();
26715        __struct.chan12_raw = buf.get_u16_le();
26716        __struct.chan13_raw = buf.get_u16_le();
26717        __struct.chan14_raw = buf.get_u16_le();
26718        __struct.chan15_raw = buf.get_u16_le();
26719        __struct.chan16_raw = buf.get_u16_le();
26720        __struct.chan17_raw = buf.get_u16_le();
26721        __struct.chan18_raw = buf.get_u16_le();
26722        Ok(__struct)
26723    }
26724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26725        let mut __tmp = BytesMut::new(bytes);
26726        #[allow(clippy::absurd_extreme_comparisons)]
26727        #[allow(unused_comparisons)]
26728        if __tmp.remaining() < Self::ENCODED_LEN {
26729            panic!(
26730                "buffer is too small (need {} bytes, but got {})",
26731                Self::ENCODED_LEN,
26732                __tmp.remaining(),
26733            )
26734        }
26735        __tmp.put_u16_le(self.chan1_raw);
26736        __tmp.put_u16_le(self.chan2_raw);
26737        __tmp.put_u16_le(self.chan3_raw);
26738        __tmp.put_u16_le(self.chan4_raw);
26739        __tmp.put_u16_le(self.chan5_raw);
26740        __tmp.put_u16_le(self.chan6_raw);
26741        __tmp.put_u16_le(self.chan7_raw);
26742        __tmp.put_u16_le(self.chan8_raw);
26743        __tmp.put_u8(self.target_system);
26744        __tmp.put_u8(self.target_component);
26745        if matches!(version, MavlinkVersion::V2) {
26746            __tmp.put_u16_le(self.chan9_raw);
26747            __tmp.put_u16_le(self.chan10_raw);
26748            __tmp.put_u16_le(self.chan11_raw);
26749            __tmp.put_u16_le(self.chan12_raw);
26750            __tmp.put_u16_le(self.chan13_raw);
26751            __tmp.put_u16_le(self.chan14_raw);
26752            __tmp.put_u16_le(self.chan15_raw);
26753            __tmp.put_u16_le(self.chan16_raw);
26754            __tmp.put_u16_le(self.chan17_raw);
26755            __tmp.put_u16_le(self.chan18_raw);
26756            let len = __tmp.len();
26757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26758        } else {
26759            __tmp.len()
26760        }
26761    }
26762}
26763#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26764#[doc = ""]
26765#[doc = "ID: 35"]
26766#[derive(Debug, Clone, PartialEq)]
26767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26769#[cfg_attr(feature = "ts", derive(TS))]
26770#[cfg_attr(feature = "ts", ts(export))]
26771pub struct RC_CHANNELS_RAW_DATA {
26772    #[doc = "Timestamp (time since system boot)."]
26773    pub time_boot_ms: u32,
26774    #[doc = "RC channel 1 value."]
26775    pub chan1_raw: u16,
26776    #[doc = "RC channel 2 value."]
26777    pub chan2_raw: u16,
26778    #[doc = "RC channel 3 value."]
26779    pub chan3_raw: u16,
26780    #[doc = "RC channel 4 value."]
26781    pub chan4_raw: u16,
26782    #[doc = "RC channel 5 value."]
26783    pub chan5_raw: u16,
26784    #[doc = "RC channel 6 value."]
26785    pub chan6_raw: u16,
26786    #[doc = "RC channel 7 value."]
26787    pub chan7_raw: u16,
26788    #[doc = "RC channel 8 value."]
26789    pub chan8_raw: u16,
26790    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26791    pub port: u8,
26792    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26793    pub rssi: u8,
26794}
26795impl RC_CHANNELS_RAW_DATA {
26796    pub const ENCODED_LEN: usize = 22usize;
26797    pub const DEFAULT: Self = Self {
26798        time_boot_ms: 0_u32,
26799        chan1_raw: 0_u16,
26800        chan2_raw: 0_u16,
26801        chan3_raw: 0_u16,
26802        chan4_raw: 0_u16,
26803        chan5_raw: 0_u16,
26804        chan6_raw: 0_u16,
26805        chan7_raw: 0_u16,
26806        chan8_raw: 0_u16,
26807        port: 0_u8,
26808        rssi: 0_u8,
26809    };
26810    #[cfg(feature = "arbitrary")]
26811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26812        use arbitrary::{Arbitrary, Unstructured};
26813        let mut buf = [0u8; 1024];
26814        rng.fill_bytes(&mut buf);
26815        let mut unstructured = Unstructured::new(&buf);
26816        Self::arbitrary(&mut unstructured).unwrap_or_default()
26817    }
26818}
26819impl Default for RC_CHANNELS_RAW_DATA {
26820    fn default() -> Self {
26821        Self::DEFAULT.clone()
26822    }
26823}
26824impl MessageData for RC_CHANNELS_RAW_DATA {
26825    type Message = MavMessage;
26826    const ID: u32 = 35u32;
26827    const NAME: &'static str = "RC_CHANNELS_RAW";
26828    const EXTRA_CRC: u8 = 244u8;
26829    const ENCODED_LEN: usize = 22usize;
26830    fn deser(
26831        _version: MavlinkVersion,
26832        __input: &[u8],
26833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26834        let avail_len = __input.len();
26835        let mut payload_buf = [0; Self::ENCODED_LEN];
26836        let mut buf = if avail_len < Self::ENCODED_LEN {
26837            payload_buf[0..avail_len].copy_from_slice(__input);
26838            Bytes::new(&payload_buf)
26839        } else {
26840            Bytes::new(__input)
26841        };
26842        let mut __struct = Self::default();
26843        __struct.time_boot_ms = buf.get_u32_le();
26844        __struct.chan1_raw = buf.get_u16_le();
26845        __struct.chan2_raw = buf.get_u16_le();
26846        __struct.chan3_raw = buf.get_u16_le();
26847        __struct.chan4_raw = buf.get_u16_le();
26848        __struct.chan5_raw = buf.get_u16_le();
26849        __struct.chan6_raw = buf.get_u16_le();
26850        __struct.chan7_raw = buf.get_u16_le();
26851        __struct.chan8_raw = buf.get_u16_le();
26852        __struct.port = buf.get_u8();
26853        __struct.rssi = buf.get_u8();
26854        Ok(__struct)
26855    }
26856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26857        let mut __tmp = BytesMut::new(bytes);
26858        #[allow(clippy::absurd_extreme_comparisons)]
26859        #[allow(unused_comparisons)]
26860        if __tmp.remaining() < Self::ENCODED_LEN {
26861            panic!(
26862                "buffer is too small (need {} bytes, but got {})",
26863                Self::ENCODED_LEN,
26864                __tmp.remaining(),
26865            )
26866        }
26867        __tmp.put_u32_le(self.time_boot_ms);
26868        __tmp.put_u16_le(self.chan1_raw);
26869        __tmp.put_u16_le(self.chan2_raw);
26870        __tmp.put_u16_le(self.chan3_raw);
26871        __tmp.put_u16_le(self.chan4_raw);
26872        __tmp.put_u16_le(self.chan5_raw);
26873        __tmp.put_u16_le(self.chan6_raw);
26874        __tmp.put_u16_le(self.chan7_raw);
26875        __tmp.put_u16_le(self.chan8_raw);
26876        __tmp.put_u8(self.port);
26877        __tmp.put_u8(self.rssi);
26878        if matches!(version, MavlinkVersion::V2) {
26879            let len = __tmp.len();
26880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26881        } else {
26882            __tmp.len()
26883        }
26884    }
26885}
26886#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26887#[doc = ""]
26888#[doc = "ID: 34"]
26889#[derive(Debug, Clone, PartialEq)]
26890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26892#[cfg_attr(feature = "ts", derive(TS))]
26893#[cfg_attr(feature = "ts", ts(export))]
26894pub struct RC_CHANNELS_SCALED_DATA {
26895    #[doc = "Timestamp (time since system boot)."]
26896    pub time_boot_ms: u32,
26897    #[doc = "RC channel 1 value scaled."]
26898    pub chan1_scaled: i16,
26899    #[doc = "RC channel 2 value scaled."]
26900    pub chan2_scaled: i16,
26901    #[doc = "RC channel 3 value scaled."]
26902    pub chan3_scaled: i16,
26903    #[doc = "RC channel 4 value scaled."]
26904    pub chan4_scaled: i16,
26905    #[doc = "RC channel 5 value scaled."]
26906    pub chan5_scaled: i16,
26907    #[doc = "RC channel 6 value scaled."]
26908    pub chan6_scaled: i16,
26909    #[doc = "RC channel 7 value scaled."]
26910    pub chan7_scaled: i16,
26911    #[doc = "RC channel 8 value scaled."]
26912    pub chan8_scaled: i16,
26913    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26914    pub port: u8,
26915    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26916    pub rssi: u8,
26917}
26918impl RC_CHANNELS_SCALED_DATA {
26919    pub const ENCODED_LEN: usize = 22usize;
26920    pub const DEFAULT: Self = Self {
26921        time_boot_ms: 0_u32,
26922        chan1_scaled: 0_i16,
26923        chan2_scaled: 0_i16,
26924        chan3_scaled: 0_i16,
26925        chan4_scaled: 0_i16,
26926        chan5_scaled: 0_i16,
26927        chan6_scaled: 0_i16,
26928        chan7_scaled: 0_i16,
26929        chan8_scaled: 0_i16,
26930        port: 0_u8,
26931        rssi: 0_u8,
26932    };
26933    #[cfg(feature = "arbitrary")]
26934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26935        use arbitrary::{Arbitrary, Unstructured};
26936        let mut buf = [0u8; 1024];
26937        rng.fill_bytes(&mut buf);
26938        let mut unstructured = Unstructured::new(&buf);
26939        Self::arbitrary(&mut unstructured).unwrap_or_default()
26940    }
26941}
26942impl Default for RC_CHANNELS_SCALED_DATA {
26943    fn default() -> Self {
26944        Self::DEFAULT.clone()
26945    }
26946}
26947impl MessageData for RC_CHANNELS_SCALED_DATA {
26948    type Message = MavMessage;
26949    const ID: u32 = 34u32;
26950    const NAME: &'static str = "RC_CHANNELS_SCALED";
26951    const EXTRA_CRC: u8 = 237u8;
26952    const ENCODED_LEN: usize = 22usize;
26953    fn deser(
26954        _version: MavlinkVersion,
26955        __input: &[u8],
26956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26957        let avail_len = __input.len();
26958        let mut payload_buf = [0; Self::ENCODED_LEN];
26959        let mut buf = if avail_len < Self::ENCODED_LEN {
26960            payload_buf[0..avail_len].copy_from_slice(__input);
26961            Bytes::new(&payload_buf)
26962        } else {
26963            Bytes::new(__input)
26964        };
26965        let mut __struct = Self::default();
26966        __struct.time_boot_ms = buf.get_u32_le();
26967        __struct.chan1_scaled = buf.get_i16_le();
26968        __struct.chan2_scaled = buf.get_i16_le();
26969        __struct.chan3_scaled = buf.get_i16_le();
26970        __struct.chan4_scaled = buf.get_i16_le();
26971        __struct.chan5_scaled = buf.get_i16_le();
26972        __struct.chan6_scaled = buf.get_i16_le();
26973        __struct.chan7_scaled = buf.get_i16_le();
26974        __struct.chan8_scaled = buf.get_i16_le();
26975        __struct.port = buf.get_u8();
26976        __struct.rssi = buf.get_u8();
26977        Ok(__struct)
26978    }
26979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26980        let mut __tmp = BytesMut::new(bytes);
26981        #[allow(clippy::absurd_extreme_comparisons)]
26982        #[allow(unused_comparisons)]
26983        if __tmp.remaining() < Self::ENCODED_LEN {
26984            panic!(
26985                "buffer is too small (need {} bytes, but got {})",
26986                Self::ENCODED_LEN,
26987                __tmp.remaining(),
26988            )
26989        }
26990        __tmp.put_u32_le(self.time_boot_ms);
26991        __tmp.put_i16_le(self.chan1_scaled);
26992        __tmp.put_i16_le(self.chan2_scaled);
26993        __tmp.put_i16_le(self.chan3_scaled);
26994        __tmp.put_i16_le(self.chan4_scaled);
26995        __tmp.put_i16_le(self.chan5_scaled);
26996        __tmp.put_i16_le(self.chan6_scaled);
26997        __tmp.put_i16_le(self.chan7_scaled);
26998        __tmp.put_i16_le(self.chan8_scaled);
26999        __tmp.put_u8(self.port);
27000        __tmp.put_u8(self.rssi);
27001        if matches!(version, MavlinkVersion::V2) {
27002            let len = __tmp.len();
27003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27004        } else {
27005            __tmp.len()
27006        }
27007    }
27008}
27009#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
27010#[doc = "Request a data stream."]
27011#[doc = ""]
27012#[doc = "ID: 66"]
27013#[derive(Debug, Clone, PartialEq)]
27014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27016#[cfg_attr(feature = "ts", derive(TS))]
27017#[cfg_attr(feature = "ts", ts(export))]
27018pub struct REQUEST_DATA_STREAM_DATA {
27019    #[doc = "The requested message rate"]
27020    pub req_message_rate: u16,
27021    #[doc = "The target requested to send the message stream."]
27022    pub target_system: u8,
27023    #[doc = "The target requested to send the message stream."]
27024    pub target_component: u8,
27025    #[doc = "The ID of the requested data stream"]
27026    pub req_stream_id: u8,
27027    #[doc = "1 to start sending, 0 to stop sending."]
27028    pub start_stop: u8,
27029}
27030impl REQUEST_DATA_STREAM_DATA {
27031    pub const ENCODED_LEN: usize = 6usize;
27032    pub const DEFAULT: Self = Self {
27033        req_message_rate: 0_u16,
27034        target_system: 0_u8,
27035        target_component: 0_u8,
27036        req_stream_id: 0_u8,
27037        start_stop: 0_u8,
27038    };
27039    #[cfg(feature = "arbitrary")]
27040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27041        use arbitrary::{Arbitrary, Unstructured};
27042        let mut buf = [0u8; 1024];
27043        rng.fill_bytes(&mut buf);
27044        let mut unstructured = Unstructured::new(&buf);
27045        Self::arbitrary(&mut unstructured).unwrap_or_default()
27046    }
27047}
27048impl Default for REQUEST_DATA_STREAM_DATA {
27049    fn default() -> Self {
27050        Self::DEFAULT.clone()
27051    }
27052}
27053impl MessageData for REQUEST_DATA_STREAM_DATA {
27054    type Message = MavMessage;
27055    const ID: u32 = 66u32;
27056    const NAME: &'static str = "REQUEST_DATA_STREAM";
27057    const EXTRA_CRC: u8 = 148u8;
27058    const ENCODED_LEN: usize = 6usize;
27059    fn deser(
27060        _version: MavlinkVersion,
27061        __input: &[u8],
27062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27063        let avail_len = __input.len();
27064        let mut payload_buf = [0; Self::ENCODED_LEN];
27065        let mut buf = if avail_len < Self::ENCODED_LEN {
27066            payload_buf[0..avail_len].copy_from_slice(__input);
27067            Bytes::new(&payload_buf)
27068        } else {
27069            Bytes::new(__input)
27070        };
27071        let mut __struct = Self::default();
27072        __struct.req_message_rate = buf.get_u16_le();
27073        __struct.target_system = buf.get_u8();
27074        __struct.target_component = buf.get_u8();
27075        __struct.req_stream_id = buf.get_u8();
27076        __struct.start_stop = buf.get_u8();
27077        Ok(__struct)
27078    }
27079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27080        let mut __tmp = BytesMut::new(bytes);
27081        #[allow(clippy::absurd_extreme_comparisons)]
27082        #[allow(unused_comparisons)]
27083        if __tmp.remaining() < Self::ENCODED_LEN {
27084            panic!(
27085                "buffer is too small (need {} bytes, but got {})",
27086                Self::ENCODED_LEN,
27087                __tmp.remaining(),
27088            )
27089        }
27090        __tmp.put_u16_le(self.req_message_rate);
27091        __tmp.put_u8(self.target_system);
27092        __tmp.put_u8(self.target_component);
27093        __tmp.put_u8(self.req_stream_id);
27094        __tmp.put_u8(self.start_stop);
27095        if matches!(version, MavlinkVersion::V2) {
27096            let len = __tmp.len();
27097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27098        } else {
27099            __tmp.len()
27100        }
27101    }
27102}
27103#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
27104#[doc = ""]
27105#[doc = "ID: 412"]
27106#[derive(Debug, Clone, PartialEq)]
27107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27109#[cfg_attr(feature = "ts", derive(TS))]
27110#[cfg_attr(feature = "ts", ts(export))]
27111pub struct REQUEST_EVENT_DATA {
27112    #[doc = "First sequence number of the requested event."]
27113    pub first_sequence: u16,
27114    #[doc = "Last sequence number of the requested event."]
27115    pub last_sequence: u16,
27116    #[doc = "System ID"]
27117    pub target_system: u8,
27118    #[doc = "Component ID"]
27119    pub target_component: u8,
27120}
27121impl REQUEST_EVENT_DATA {
27122    pub const ENCODED_LEN: usize = 6usize;
27123    pub const DEFAULT: Self = Self {
27124        first_sequence: 0_u16,
27125        last_sequence: 0_u16,
27126        target_system: 0_u8,
27127        target_component: 0_u8,
27128    };
27129    #[cfg(feature = "arbitrary")]
27130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27131        use arbitrary::{Arbitrary, Unstructured};
27132        let mut buf = [0u8; 1024];
27133        rng.fill_bytes(&mut buf);
27134        let mut unstructured = Unstructured::new(&buf);
27135        Self::arbitrary(&mut unstructured).unwrap_or_default()
27136    }
27137}
27138impl Default for REQUEST_EVENT_DATA {
27139    fn default() -> Self {
27140        Self::DEFAULT.clone()
27141    }
27142}
27143impl MessageData for REQUEST_EVENT_DATA {
27144    type Message = MavMessage;
27145    const ID: u32 = 412u32;
27146    const NAME: &'static str = "REQUEST_EVENT";
27147    const EXTRA_CRC: u8 = 33u8;
27148    const ENCODED_LEN: usize = 6usize;
27149    fn deser(
27150        _version: MavlinkVersion,
27151        __input: &[u8],
27152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27153        let avail_len = __input.len();
27154        let mut payload_buf = [0; Self::ENCODED_LEN];
27155        let mut buf = if avail_len < Self::ENCODED_LEN {
27156            payload_buf[0..avail_len].copy_from_slice(__input);
27157            Bytes::new(&payload_buf)
27158        } else {
27159            Bytes::new(__input)
27160        };
27161        let mut __struct = Self::default();
27162        __struct.first_sequence = buf.get_u16_le();
27163        __struct.last_sequence = buf.get_u16_le();
27164        __struct.target_system = buf.get_u8();
27165        __struct.target_component = buf.get_u8();
27166        Ok(__struct)
27167    }
27168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27169        let mut __tmp = BytesMut::new(bytes);
27170        #[allow(clippy::absurd_extreme_comparisons)]
27171        #[allow(unused_comparisons)]
27172        if __tmp.remaining() < Self::ENCODED_LEN {
27173            panic!(
27174                "buffer is too small (need {} bytes, but got {})",
27175                Self::ENCODED_LEN,
27176                __tmp.remaining(),
27177            )
27178        }
27179        __tmp.put_u16_le(self.first_sequence);
27180        __tmp.put_u16_le(self.last_sequence);
27181        __tmp.put_u8(self.target_system);
27182        __tmp.put_u8(self.target_component);
27183        if matches!(version, MavlinkVersion::V2) {
27184            let len = __tmp.len();
27185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27186        } else {
27187            __tmp.len()
27188        }
27189    }
27190}
27191#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
27192#[doc = ""]
27193#[doc = "ID: 142"]
27194#[derive(Debug, Clone, PartialEq)]
27195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27197#[cfg_attr(feature = "ts", derive(TS))]
27198#[cfg_attr(feature = "ts", ts(export))]
27199pub struct RESOURCE_REQUEST_DATA {
27200    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27201    pub request_id: u8,
27202    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27203    pub uri_type: u8,
27204    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27207    pub uri: [u8; 120],
27208    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27209    pub transfer_type: u8,
27210    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27212    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27213    pub storage: [u8; 120],
27214}
27215impl RESOURCE_REQUEST_DATA {
27216    pub const ENCODED_LEN: usize = 243usize;
27217    pub const DEFAULT: Self = Self {
27218        request_id: 0_u8,
27219        uri_type: 0_u8,
27220        uri: [0_u8; 120usize],
27221        transfer_type: 0_u8,
27222        storage: [0_u8; 120usize],
27223    };
27224    #[cfg(feature = "arbitrary")]
27225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27226        use arbitrary::{Arbitrary, Unstructured};
27227        let mut buf = [0u8; 1024];
27228        rng.fill_bytes(&mut buf);
27229        let mut unstructured = Unstructured::new(&buf);
27230        Self::arbitrary(&mut unstructured).unwrap_or_default()
27231    }
27232}
27233impl Default for RESOURCE_REQUEST_DATA {
27234    fn default() -> Self {
27235        Self::DEFAULT.clone()
27236    }
27237}
27238impl MessageData for RESOURCE_REQUEST_DATA {
27239    type Message = MavMessage;
27240    const ID: u32 = 142u32;
27241    const NAME: &'static str = "RESOURCE_REQUEST";
27242    const EXTRA_CRC: u8 = 72u8;
27243    const ENCODED_LEN: usize = 243usize;
27244    fn deser(
27245        _version: MavlinkVersion,
27246        __input: &[u8],
27247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27248        let avail_len = __input.len();
27249        let mut payload_buf = [0; Self::ENCODED_LEN];
27250        let mut buf = if avail_len < Self::ENCODED_LEN {
27251            payload_buf[0..avail_len].copy_from_slice(__input);
27252            Bytes::new(&payload_buf)
27253        } else {
27254            Bytes::new(__input)
27255        };
27256        let mut __struct = Self::default();
27257        __struct.request_id = buf.get_u8();
27258        __struct.uri_type = buf.get_u8();
27259        for v in &mut __struct.uri {
27260            let val = buf.get_u8();
27261            *v = val;
27262        }
27263        __struct.transfer_type = buf.get_u8();
27264        for v in &mut __struct.storage {
27265            let val = buf.get_u8();
27266            *v = val;
27267        }
27268        Ok(__struct)
27269    }
27270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27271        let mut __tmp = BytesMut::new(bytes);
27272        #[allow(clippy::absurd_extreme_comparisons)]
27273        #[allow(unused_comparisons)]
27274        if __tmp.remaining() < Self::ENCODED_LEN {
27275            panic!(
27276                "buffer is too small (need {} bytes, but got {})",
27277                Self::ENCODED_LEN,
27278                __tmp.remaining(),
27279            )
27280        }
27281        __tmp.put_u8(self.request_id);
27282        __tmp.put_u8(self.uri_type);
27283        for val in &self.uri {
27284            __tmp.put_u8(*val);
27285        }
27286        __tmp.put_u8(self.transfer_type);
27287        for val in &self.storage {
27288            __tmp.put_u8(*val);
27289        }
27290        if matches!(version, MavlinkVersion::V2) {
27291            let len = __tmp.len();
27292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27293        } else {
27294            __tmp.len()
27295        }
27296    }
27297}
27298#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27299#[doc = ""]
27300#[doc = "ID: 413"]
27301#[derive(Debug, Clone, PartialEq)]
27302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27304#[cfg_attr(feature = "ts", derive(TS))]
27305#[cfg_attr(feature = "ts", ts(export))]
27306pub struct RESPONSE_EVENT_ERROR_DATA {
27307    #[doc = "Sequence number."]
27308    pub sequence: u16,
27309    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27310    pub sequence_oldest_available: u16,
27311    #[doc = "System ID"]
27312    pub target_system: u8,
27313    #[doc = "Component ID"]
27314    pub target_component: u8,
27315    #[doc = "Error reason."]
27316    pub reason: MavEventErrorReason,
27317}
27318impl RESPONSE_EVENT_ERROR_DATA {
27319    pub const ENCODED_LEN: usize = 7usize;
27320    pub const DEFAULT: Self = Self {
27321        sequence: 0_u16,
27322        sequence_oldest_available: 0_u16,
27323        target_system: 0_u8,
27324        target_component: 0_u8,
27325        reason: MavEventErrorReason::DEFAULT,
27326    };
27327    #[cfg(feature = "arbitrary")]
27328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27329        use arbitrary::{Arbitrary, Unstructured};
27330        let mut buf = [0u8; 1024];
27331        rng.fill_bytes(&mut buf);
27332        let mut unstructured = Unstructured::new(&buf);
27333        Self::arbitrary(&mut unstructured).unwrap_or_default()
27334    }
27335}
27336impl Default for RESPONSE_EVENT_ERROR_DATA {
27337    fn default() -> Self {
27338        Self::DEFAULT.clone()
27339    }
27340}
27341impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27342    type Message = MavMessage;
27343    const ID: u32 = 413u32;
27344    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27345    const EXTRA_CRC: u8 = 77u8;
27346    const ENCODED_LEN: usize = 7usize;
27347    fn deser(
27348        _version: MavlinkVersion,
27349        __input: &[u8],
27350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27351        let avail_len = __input.len();
27352        let mut payload_buf = [0; Self::ENCODED_LEN];
27353        let mut buf = if avail_len < Self::ENCODED_LEN {
27354            payload_buf[0..avail_len].copy_from_slice(__input);
27355            Bytes::new(&payload_buf)
27356        } else {
27357            Bytes::new(__input)
27358        };
27359        let mut __struct = Self::default();
27360        __struct.sequence = buf.get_u16_le();
27361        __struct.sequence_oldest_available = buf.get_u16_le();
27362        __struct.target_system = buf.get_u8();
27363        __struct.target_component = buf.get_u8();
27364        let tmp = buf.get_u8();
27365        __struct.reason =
27366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27367                enum_type: "MavEventErrorReason",
27368                value: tmp as u64,
27369            })?;
27370        Ok(__struct)
27371    }
27372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27373        let mut __tmp = BytesMut::new(bytes);
27374        #[allow(clippy::absurd_extreme_comparisons)]
27375        #[allow(unused_comparisons)]
27376        if __tmp.remaining() < Self::ENCODED_LEN {
27377            panic!(
27378                "buffer is too small (need {} bytes, but got {})",
27379                Self::ENCODED_LEN,
27380                __tmp.remaining(),
27381            )
27382        }
27383        __tmp.put_u16_le(self.sequence);
27384        __tmp.put_u16_le(self.sequence_oldest_available);
27385        __tmp.put_u8(self.target_system);
27386        __tmp.put_u8(self.target_component);
27387        __tmp.put_u8(self.reason as u8);
27388        if matches!(version, MavlinkVersion::V2) {
27389            let len = __tmp.len();
27390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27391        } else {
27392            __tmp.len()
27393        }
27394    }
27395}
27396#[doc = "Read out the safety zone the MAV currently assumes."]
27397#[doc = ""]
27398#[doc = "ID: 55"]
27399#[derive(Debug, Clone, PartialEq)]
27400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27402#[cfg_attr(feature = "ts", derive(TS))]
27403#[cfg_attr(feature = "ts", ts(export))]
27404pub struct SAFETY_ALLOWED_AREA_DATA {
27405    #[doc = "x position 1 / Latitude 1"]
27406    pub p1x: f32,
27407    #[doc = "y position 1 / Longitude 1"]
27408    pub p1y: f32,
27409    #[doc = "z position 1 / Altitude 1"]
27410    pub p1z: f32,
27411    #[doc = "x position 2 / Latitude 2"]
27412    pub p2x: f32,
27413    #[doc = "y position 2 / Longitude 2"]
27414    pub p2y: f32,
27415    #[doc = "z position 2 / Altitude 2"]
27416    pub p2z: f32,
27417    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27418    pub frame: MavFrame,
27419}
27420impl SAFETY_ALLOWED_AREA_DATA {
27421    pub const ENCODED_LEN: usize = 25usize;
27422    pub const DEFAULT: Self = Self {
27423        p1x: 0.0_f32,
27424        p1y: 0.0_f32,
27425        p1z: 0.0_f32,
27426        p2x: 0.0_f32,
27427        p2y: 0.0_f32,
27428        p2z: 0.0_f32,
27429        frame: MavFrame::DEFAULT,
27430    };
27431    #[cfg(feature = "arbitrary")]
27432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27433        use arbitrary::{Arbitrary, Unstructured};
27434        let mut buf = [0u8; 1024];
27435        rng.fill_bytes(&mut buf);
27436        let mut unstructured = Unstructured::new(&buf);
27437        Self::arbitrary(&mut unstructured).unwrap_or_default()
27438    }
27439}
27440impl Default for SAFETY_ALLOWED_AREA_DATA {
27441    fn default() -> Self {
27442        Self::DEFAULT.clone()
27443    }
27444}
27445impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27446    type Message = MavMessage;
27447    const ID: u32 = 55u32;
27448    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27449    const EXTRA_CRC: u8 = 3u8;
27450    const ENCODED_LEN: usize = 25usize;
27451    fn deser(
27452        _version: MavlinkVersion,
27453        __input: &[u8],
27454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27455        let avail_len = __input.len();
27456        let mut payload_buf = [0; Self::ENCODED_LEN];
27457        let mut buf = if avail_len < Self::ENCODED_LEN {
27458            payload_buf[0..avail_len].copy_from_slice(__input);
27459            Bytes::new(&payload_buf)
27460        } else {
27461            Bytes::new(__input)
27462        };
27463        let mut __struct = Self::default();
27464        __struct.p1x = buf.get_f32_le();
27465        __struct.p1y = buf.get_f32_le();
27466        __struct.p1z = buf.get_f32_le();
27467        __struct.p2x = buf.get_f32_le();
27468        __struct.p2y = buf.get_f32_le();
27469        __struct.p2z = buf.get_f32_le();
27470        let tmp = buf.get_u8();
27471        __struct.frame =
27472            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27473                enum_type: "MavFrame",
27474                value: tmp as u64,
27475            })?;
27476        Ok(__struct)
27477    }
27478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27479        let mut __tmp = BytesMut::new(bytes);
27480        #[allow(clippy::absurd_extreme_comparisons)]
27481        #[allow(unused_comparisons)]
27482        if __tmp.remaining() < Self::ENCODED_LEN {
27483            panic!(
27484                "buffer is too small (need {} bytes, but got {})",
27485                Self::ENCODED_LEN,
27486                __tmp.remaining(),
27487            )
27488        }
27489        __tmp.put_f32_le(self.p1x);
27490        __tmp.put_f32_le(self.p1y);
27491        __tmp.put_f32_le(self.p1z);
27492        __tmp.put_f32_le(self.p2x);
27493        __tmp.put_f32_le(self.p2y);
27494        __tmp.put_f32_le(self.p2z);
27495        __tmp.put_u8(self.frame as u8);
27496        if matches!(version, MavlinkVersion::V2) {
27497            let len = __tmp.len();
27498            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27499        } else {
27500            __tmp.len()
27501        }
27502    }
27503}
27504#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27505#[doc = ""]
27506#[doc = "ID: 54"]
27507#[derive(Debug, Clone, PartialEq)]
27508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27510#[cfg_attr(feature = "ts", derive(TS))]
27511#[cfg_attr(feature = "ts", ts(export))]
27512pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27513    #[doc = "x position 1 / Latitude 1"]
27514    pub p1x: f32,
27515    #[doc = "y position 1 / Longitude 1"]
27516    pub p1y: f32,
27517    #[doc = "z position 1 / Altitude 1"]
27518    pub p1z: f32,
27519    #[doc = "x position 2 / Latitude 2"]
27520    pub p2x: f32,
27521    #[doc = "y position 2 / Longitude 2"]
27522    pub p2y: f32,
27523    #[doc = "z position 2 / Altitude 2"]
27524    pub p2z: f32,
27525    #[doc = "System ID"]
27526    pub target_system: u8,
27527    #[doc = "Component ID"]
27528    pub target_component: u8,
27529    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27530    pub frame: MavFrame,
27531}
27532impl SAFETY_SET_ALLOWED_AREA_DATA {
27533    pub const ENCODED_LEN: usize = 27usize;
27534    pub const DEFAULT: Self = Self {
27535        p1x: 0.0_f32,
27536        p1y: 0.0_f32,
27537        p1z: 0.0_f32,
27538        p2x: 0.0_f32,
27539        p2y: 0.0_f32,
27540        p2z: 0.0_f32,
27541        target_system: 0_u8,
27542        target_component: 0_u8,
27543        frame: MavFrame::DEFAULT,
27544    };
27545    #[cfg(feature = "arbitrary")]
27546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27547        use arbitrary::{Arbitrary, Unstructured};
27548        let mut buf = [0u8; 1024];
27549        rng.fill_bytes(&mut buf);
27550        let mut unstructured = Unstructured::new(&buf);
27551        Self::arbitrary(&mut unstructured).unwrap_or_default()
27552    }
27553}
27554impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27555    fn default() -> Self {
27556        Self::DEFAULT.clone()
27557    }
27558}
27559impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27560    type Message = MavMessage;
27561    const ID: u32 = 54u32;
27562    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27563    const EXTRA_CRC: u8 = 15u8;
27564    const ENCODED_LEN: usize = 27usize;
27565    fn deser(
27566        _version: MavlinkVersion,
27567        __input: &[u8],
27568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27569        let avail_len = __input.len();
27570        let mut payload_buf = [0; Self::ENCODED_LEN];
27571        let mut buf = if avail_len < Self::ENCODED_LEN {
27572            payload_buf[0..avail_len].copy_from_slice(__input);
27573            Bytes::new(&payload_buf)
27574        } else {
27575            Bytes::new(__input)
27576        };
27577        let mut __struct = Self::default();
27578        __struct.p1x = buf.get_f32_le();
27579        __struct.p1y = buf.get_f32_le();
27580        __struct.p1z = buf.get_f32_le();
27581        __struct.p2x = buf.get_f32_le();
27582        __struct.p2y = buf.get_f32_le();
27583        __struct.p2z = buf.get_f32_le();
27584        __struct.target_system = buf.get_u8();
27585        __struct.target_component = buf.get_u8();
27586        let tmp = buf.get_u8();
27587        __struct.frame =
27588            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27589                enum_type: "MavFrame",
27590                value: tmp as u64,
27591            })?;
27592        Ok(__struct)
27593    }
27594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27595        let mut __tmp = BytesMut::new(bytes);
27596        #[allow(clippy::absurd_extreme_comparisons)]
27597        #[allow(unused_comparisons)]
27598        if __tmp.remaining() < Self::ENCODED_LEN {
27599            panic!(
27600                "buffer is too small (need {} bytes, but got {})",
27601                Self::ENCODED_LEN,
27602                __tmp.remaining(),
27603            )
27604        }
27605        __tmp.put_f32_le(self.p1x);
27606        __tmp.put_f32_le(self.p1y);
27607        __tmp.put_f32_le(self.p1z);
27608        __tmp.put_f32_le(self.p2x);
27609        __tmp.put_f32_le(self.p2y);
27610        __tmp.put_f32_le(self.p2z);
27611        __tmp.put_u8(self.target_system);
27612        __tmp.put_u8(self.target_component);
27613        __tmp.put_u8(self.frame as u8);
27614        if matches!(version, MavlinkVersion::V2) {
27615            let len = __tmp.len();
27616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27617        } else {
27618            __tmp.len()
27619        }
27620    }
27621}
27622#[doc = "Status of the SatCom link."]
27623#[doc = ""]
27624#[doc = "ID: 8015"]
27625#[derive(Debug, Clone, PartialEq)]
27626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27628#[cfg_attr(feature = "ts", derive(TS))]
27629#[cfg_attr(feature = "ts", ts(export))]
27630pub struct SATCOM_LINK_STATUS_DATA {
27631    #[doc = "Timestamp"]
27632    pub timestamp: u64,
27633    #[doc = "Timestamp of the last successful sbd session"]
27634    pub last_heartbeat: u64,
27635    #[doc = "Number of failed sessions"]
27636    pub failed_sessions: u16,
27637    #[doc = "Number of successful sessions"]
27638    pub successful_sessions: u16,
27639    #[doc = "Signal quality"]
27640    pub signal_quality: u8,
27641    #[doc = "Ring call pending"]
27642    pub ring_pending: u8,
27643    #[doc = "Transmission session pending"]
27644    pub tx_session_pending: u8,
27645    #[doc = "Receiving session pending"]
27646    pub rx_session_pending: u8,
27647}
27648impl SATCOM_LINK_STATUS_DATA {
27649    pub const ENCODED_LEN: usize = 24usize;
27650    pub const DEFAULT: Self = Self {
27651        timestamp: 0_u64,
27652        last_heartbeat: 0_u64,
27653        failed_sessions: 0_u16,
27654        successful_sessions: 0_u16,
27655        signal_quality: 0_u8,
27656        ring_pending: 0_u8,
27657        tx_session_pending: 0_u8,
27658        rx_session_pending: 0_u8,
27659    };
27660    #[cfg(feature = "arbitrary")]
27661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27662        use arbitrary::{Arbitrary, Unstructured};
27663        let mut buf = [0u8; 1024];
27664        rng.fill_bytes(&mut buf);
27665        let mut unstructured = Unstructured::new(&buf);
27666        Self::arbitrary(&mut unstructured).unwrap_or_default()
27667    }
27668}
27669impl Default for SATCOM_LINK_STATUS_DATA {
27670    fn default() -> Self {
27671        Self::DEFAULT.clone()
27672    }
27673}
27674impl MessageData for SATCOM_LINK_STATUS_DATA {
27675    type Message = MavMessage;
27676    const ID: u32 = 8015u32;
27677    const NAME: &'static str = "SATCOM_LINK_STATUS";
27678    const EXTRA_CRC: u8 = 23u8;
27679    const ENCODED_LEN: usize = 24usize;
27680    fn deser(
27681        _version: MavlinkVersion,
27682        __input: &[u8],
27683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27684        let avail_len = __input.len();
27685        let mut payload_buf = [0; Self::ENCODED_LEN];
27686        let mut buf = if avail_len < Self::ENCODED_LEN {
27687            payload_buf[0..avail_len].copy_from_slice(__input);
27688            Bytes::new(&payload_buf)
27689        } else {
27690            Bytes::new(__input)
27691        };
27692        let mut __struct = Self::default();
27693        __struct.timestamp = buf.get_u64_le();
27694        __struct.last_heartbeat = buf.get_u64_le();
27695        __struct.failed_sessions = buf.get_u16_le();
27696        __struct.successful_sessions = buf.get_u16_le();
27697        __struct.signal_quality = buf.get_u8();
27698        __struct.ring_pending = buf.get_u8();
27699        __struct.tx_session_pending = buf.get_u8();
27700        __struct.rx_session_pending = buf.get_u8();
27701        Ok(__struct)
27702    }
27703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27704        let mut __tmp = BytesMut::new(bytes);
27705        #[allow(clippy::absurd_extreme_comparisons)]
27706        #[allow(unused_comparisons)]
27707        if __tmp.remaining() < Self::ENCODED_LEN {
27708            panic!(
27709                "buffer is too small (need {} bytes, but got {})",
27710                Self::ENCODED_LEN,
27711                __tmp.remaining(),
27712            )
27713        }
27714        __tmp.put_u64_le(self.timestamp);
27715        __tmp.put_u64_le(self.last_heartbeat);
27716        __tmp.put_u16_le(self.failed_sessions);
27717        __tmp.put_u16_le(self.successful_sessions);
27718        __tmp.put_u8(self.signal_quality);
27719        __tmp.put_u8(self.ring_pending);
27720        __tmp.put_u8(self.tx_session_pending);
27721        __tmp.put_u8(self.rx_session_pending);
27722        if matches!(version, MavlinkVersion::V2) {
27723            let len = __tmp.len();
27724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27725        } else {
27726            __tmp.len()
27727        }
27728    }
27729}
27730#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27731#[doc = ""]
27732#[doc = "ID: 26"]
27733#[derive(Debug, Clone, PartialEq)]
27734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27736#[cfg_attr(feature = "ts", derive(TS))]
27737#[cfg_attr(feature = "ts", ts(export))]
27738pub struct SCALED_IMU_DATA {
27739    #[doc = "Timestamp (time since system boot)."]
27740    pub time_boot_ms: u32,
27741    #[doc = "X acceleration"]
27742    pub xacc: i16,
27743    #[doc = "Y acceleration"]
27744    pub yacc: i16,
27745    #[doc = "Z acceleration"]
27746    pub zacc: i16,
27747    #[doc = "Angular speed around X axis"]
27748    pub xgyro: i16,
27749    #[doc = "Angular speed around Y axis"]
27750    pub ygyro: i16,
27751    #[doc = "Angular speed around Z axis"]
27752    pub zgyro: i16,
27753    #[doc = "X Magnetic field"]
27754    pub xmag: i16,
27755    #[doc = "Y Magnetic field"]
27756    pub ymag: i16,
27757    #[doc = "Z Magnetic field"]
27758    pub zmag: i16,
27759    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27761    pub temperature: i16,
27762}
27763impl SCALED_IMU_DATA {
27764    pub const ENCODED_LEN: usize = 24usize;
27765    pub const DEFAULT: Self = Self {
27766        time_boot_ms: 0_u32,
27767        xacc: 0_i16,
27768        yacc: 0_i16,
27769        zacc: 0_i16,
27770        xgyro: 0_i16,
27771        ygyro: 0_i16,
27772        zgyro: 0_i16,
27773        xmag: 0_i16,
27774        ymag: 0_i16,
27775        zmag: 0_i16,
27776        temperature: 0_i16,
27777    };
27778    #[cfg(feature = "arbitrary")]
27779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27780        use arbitrary::{Arbitrary, Unstructured};
27781        let mut buf = [0u8; 1024];
27782        rng.fill_bytes(&mut buf);
27783        let mut unstructured = Unstructured::new(&buf);
27784        Self::arbitrary(&mut unstructured).unwrap_or_default()
27785    }
27786}
27787impl Default for SCALED_IMU_DATA {
27788    fn default() -> Self {
27789        Self::DEFAULT.clone()
27790    }
27791}
27792impl MessageData for SCALED_IMU_DATA {
27793    type Message = MavMessage;
27794    const ID: u32 = 26u32;
27795    const NAME: &'static str = "SCALED_IMU";
27796    const EXTRA_CRC: u8 = 170u8;
27797    const ENCODED_LEN: usize = 24usize;
27798    fn deser(
27799        _version: MavlinkVersion,
27800        __input: &[u8],
27801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27802        let avail_len = __input.len();
27803        let mut payload_buf = [0; Self::ENCODED_LEN];
27804        let mut buf = if avail_len < Self::ENCODED_LEN {
27805            payload_buf[0..avail_len].copy_from_slice(__input);
27806            Bytes::new(&payload_buf)
27807        } else {
27808            Bytes::new(__input)
27809        };
27810        let mut __struct = Self::default();
27811        __struct.time_boot_ms = buf.get_u32_le();
27812        __struct.xacc = buf.get_i16_le();
27813        __struct.yacc = buf.get_i16_le();
27814        __struct.zacc = buf.get_i16_le();
27815        __struct.xgyro = buf.get_i16_le();
27816        __struct.ygyro = buf.get_i16_le();
27817        __struct.zgyro = buf.get_i16_le();
27818        __struct.xmag = buf.get_i16_le();
27819        __struct.ymag = buf.get_i16_le();
27820        __struct.zmag = buf.get_i16_le();
27821        __struct.temperature = buf.get_i16_le();
27822        Ok(__struct)
27823    }
27824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27825        let mut __tmp = BytesMut::new(bytes);
27826        #[allow(clippy::absurd_extreme_comparisons)]
27827        #[allow(unused_comparisons)]
27828        if __tmp.remaining() < Self::ENCODED_LEN {
27829            panic!(
27830                "buffer is too small (need {} bytes, but got {})",
27831                Self::ENCODED_LEN,
27832                __tmp.remaining(),
27833            )
27834        }
27835        __tmp.put_u32_le(self.time_boot_ms);
27836        __tmp.put_i16_le(self.xacc);
27837        __tmp.put_i16_le(self.yacc);
27838        __tmp.put_i16_le(self.zacc);
27839        __tmp.put_i16_le(self.xgyro);
27840        __tmp.put_i16_le(self.ygyro);
27841        __tmp.put_i16_le(self.zgyro);
27842        __tmp.put_i16_le(self.xmag);
27843        __tmp.put_i16_le(self.ymag);
27844        __tmp.put_i16_le(self.zmag);
27845        if matches!(version, MavlinkVersion::V2) {
27846            __tmp.put_i16_le(self.temperature);
27847            let len = __tmp.len();
27848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27849        } else {
27850            __tmp.len()
27851        }
27852    }
27853}
27854#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27855#[doc = ""]
27856#[doc = "ID: 116"]
27857#[derive(Debug, Clone, PartialEq)]
27858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27860#[cfg_attr(feature = "ts", derive(TS))]
27861#[cfg_attr(feature = "ts", ts(export))]
27862pub struct SCALED_IMU2_DATA {
27863    #[doc = "Timestamp (time since system boot)."]
27864    pub time_boot_ms: u32,
27865    #[doc = "X acceleration"]
27866    pub xacc: i16,
27867    #[doc = "Y acceleration"]
27868    pub yacc: i16,
27869    #[doc = "Z acceleration"]
27870    pub zacc: i16,
27871    #[doc = "Angular speed around X axis"]
27872    pub xgyro: i16,
27873    #[doc = "Angular speed around Y axis"]
27874    pub ygyro: i16,
27875    #[doc = "Angular speed around Z axis"]
27876    pub zgyro: i16,
27877    #[doc = "X Magnetic field"]
27878    pub xmag: i16,
27879    #[doc = "Y Magnetic field"]
27880    pub ymag: i16,
27881    #[doc = "Z Magnetic field"]
27882    pub zmag: i16,
27883    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27885    pub temperature: i16,
27886}
27887impl SCALED_IMU2_DATA {
27888    pub const ENCODED_LEN: usize = 24usize;
27889    pub const DEFAULT: Self = Self {
27890        time_boot_ms: 0_u32,
27891        xacc: 0_i16,
27892        yacc: 0_i16,
27893        zacc: 0_i16,
27894        xgyro: 0_i16,
27895        ygyro: 0_i16,
27896        zgyro: 0_i16,
27897        xmag: 0_i16,
27898        ymag: 0_i16,
27899        zmag: 0_i16,
27900        temperature: 0_i16,
27901    };
27902    #[cfg(feature = "arbitrary")]
27903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27904        use arbitrary::{Arbitrary, Unstructured};
27905        let mut buf = [0u8; 1024];
27906        rng.fill_bytes(&mut buf);
27907        let mut unstructured = Unstructured::new(&buf);
27908        Self::arbitrary(&mut unstructured).unwrap_or_default()
27909    }
27910}
27911impl Default for SCALED_IMU2_DATA {
27912    fn default() -> Self {
27913        Self::DEFAULT.clone()
27914    }
27915}
27916impl MessageData for SCALED_IMU2_DATA {
27917    type Message = MavMessage;
27918    const ID: u32 = 116u32;
27919    const NAME: &'static str = "SCALED_IMU2";
27920    const EXTRA_CRC: u8 = 76u8;
27921    const ENCODED_LEN: usize = 24usize;
27922    fn deser(
27923        _version: MavlinkVersion,
27924        __input: &[u8],
27925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27926        let avail_len = __input.len();
27927        let mut payload_buf = [0; Self::ENCODED_LEN];
27928        let mut buf = if avail_len < Self::ENCODED_LEN {
27929            payload_buf[0..avail_len].copy_from_slice(__input);
27930            Bytes::new(&payload_buf)
27931        } else {
27932            Bytes::new(__input)
27933        };
27934        let mut __struct = Self::default();
27935        __struct.time_boot_ms = buf.get_u32_le();
27936        __struct.xacc = buf.get_i16_le();
27937        __struct.yacc = buf.get_i16_le();
27938        __struct.zacc = buf.get_i16_le();
27939        __struct.xgyro = buf.get_i16_le();
27940        __struct.ygyro = buf.get_i16_le();
27941        __struct.zgyro = buf.get_i16_le();
27942        __struct.xmag = buf.get_i16_le();
27943        __struct.ymag = buf.get_i16_le();
27944        __struct.zmag = buf.get_i16_le();
27945        __struct.temperature = buf.get_i16_le();
27946        Ok(__struct)
27947    }
27948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27949        let mut __tmp = BytesMut::new(bytes);
27950        #[allow(clippy::absurd_extreme_comparisons)]
27951        #[allow(unused_comparisons)]
27952        if __tmp.remaining() < Self::ENCODED_LEN {
27953            panic!(
27954                "buffer is too small (need {} bytes, but got {})",
27955                Self::ENCODED_LEN,
27956                __tmp.remaining(),
27957            )
27958        }
27959        __tmp.put_u32_le(self.time_boot_ms);
27960        __tmp.put_i16_le(self.xacc);
27961        __tmp.put_i16_le(self.yacc);
27962        __tmp.put_i16_le(self.zacc);
27963        __tmp.put_i16_le(self.xgyro);
27964        __tmp.put_i16_le(self.ygyro);
27965        __tmp.put_i16_le(self.zgyro);
27966        __tmp.put_i16_le(self.xmag);
27967        __tmp.put_i16_le(self.ymag);
27968        __tmp.put_i16_le(self.zmag);
27969        if matches!(version, MavlinkVersion::V2) {
27970            __tmp.put_i16_le(self.temperature);
27971            let len = __tmp.len();
27972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27973        } else {
27974            __tmp.len()
27975        }
27976    }
27977}
27978#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27979#[doc = ""]
27980#[doc = "ID: 129"]
27981#[derive(Debug, Clone, PartialEq)]
27982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27984#[cfg_attr(feature = "ts", derive(TS))]
27985#[cfg_attr(feature = "ts", ts(export))]
27986pub struct SCALED_IMU3_DATA {
27987    #[doc = "Timestamp (time since system boot)."]
27988    pub time_boot_ms: u32,
27989    #[doc = "X acceleration"]
27990    pub xacc: i16,
27991    #[doc = "Y acceleration"]
27992    pub yacc: i16,
27993    #[doc = "Z acceleration"]
27994    pub zacc: i16,
27995    #[doc = "Angular speed around X axis"]
27996    pub xgyro: i16,
27997    #[doc = "Angular speed around Y axis"]
27998    pub ygyro: i16,
27999    #[doc = "Angular speed around Z axis"]
28000    pub zgyro: i16,
28001    #[doc = "X Magnetic field"]
28002    pub xmag: i16,
28003    #[doc = "Y Magnetic field"]
28004    pub ymag: i16,
28005    #[doc = "Z Magnetic field"]
28006    pub zmag: i16,
28007    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28008    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28009    pub temperature: i16,
28010}
28011impl SCALED_IMU3_DATA {
28012    pub const ENCODED_LEN: usize = 24usize;
28013    pub const DEFAULT: Self = Self {
28014        time_boot_ms: 0_u32,
28015        xacc: 0_i16,
28016        yacc: 0_i16,
28017        zacc: 0_i16,
28018        xgyro: 0_i16,
28019        ygyro: 0_i16,
28020        zgyro: 0_i16,
28021        xmag: 0_i16,
28022        ymag: 0_i16,
28023        zmag: 0_i16,
28024        temperature: 0_i16,
28025    };
28026    #[cfg(feature = "arbitrary")]
28027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28028        use arbitrary::{Arbitrary, Unstructured};
28029        let mut buf = [0u8; 1024];
28030        rng.fill_bytes(&mut buf);
28031        let mut unstructured = Unstructured::new(&buf);
28032        Self::arbitrary(&mut unstructured).unwrap_or_default()
28033    }
28034}
28035impl Default for SCALED_IMU3_DATA {
28036    fn default() -> Self {
28037        Self::DEFAULT.clone()
28038    }
28039}
28040impl MessageData for SCALED_IMU3_DATA {
28041    type Message = MavMessage;
28042    const ID: u32 = 129u32;
28043    const NAME: &'static str = "SCALED_IMU3";
28044    const EXTRA_CRC: u8 = 46u8;
28045    const ENCODED_LEN: usize = 24usize;
28046    fn deser(
28047        _version: MavlinkVersion,
28048        __input: &[u8],
28049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28050        let avail_len = __input.len();
28051        let mut payload_buf = [0; Self::ENCODED_LEN];
28052        let mut buf = if avail_len < Self::ENCODED_LEN {
28053            payload_buf[0..avail_len].copy_from_slice(__input);
28054            Bytes::new(&payload_buf)
28055        } else {
28056            Bytes::new(__input)
28057        };
28058        let mut __struct = Self::default();
28059        __struct.time_boot_ms = buf.get_u32_le();
28060        __struct.xacc = buf.get_i16_le();
28061        __struct.yacc = buf.get_i16_le();
28062        __struct.zacc = buf.get_i16_le();
28063        __struct.xgyro = buf.get_i16_le();
28064        __struct.ygyro = buf.get_i16_le();
28065        __struct.zgyro = buf.get_i16_le();
28066        __struct.xmag = buf.get_i16_le();
28067        __struct.ymag = buf.get_i16_le();
28068        __struct.zmag = buf.get_i16_le();
28069        __struct.temperature = buf.get_i16_le();
28070        Ok(__struct)
28071    }
28072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28073        let mut __tmp = BytesMut::new(bytes);
28074        #[allow(clippy::absurd_extreme_comparisons)]
28075        #[allow(unused_comparisons)]
28076        if __tmp.remaining() < Self::ENCODED_LEN {
28077            panic!(
28078                "buffer is too small (need {} bytes, but got {})",
28079                Self::ENCODED_LEN,
28080                __tmp.remaining(),
28081            )
28082        }
28083        __tmp.put_u32_le(self.time_boot_ms);
28084        __tmp.put_i16_le(self.xacc);
28085        __tmp.put_i16_le(self.yacc);
28086        __tmp.put_i16_le(self.zacc);
28087        __tmp.put_i16_le(self.xgyro);
28088        __tmp.put_i16_le(self.ygyro);
28089        __tmp.put_i16_le(self.zgyro);
28090        __tmp.put_i16_le(self.xmag);
28091        __tmp.put_i16_le(self.ymag);
28092        __tmp.put_i16_le(self.zmag);
28093        if matches!(version, MavlinkVersion::V2) {
28094            __tmp.put_i16_le(self.temperature);
28095            let len = __tmp.len();
28096            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28097        } else {
28098            __tmp.len()
28099        }
28100    }
28101}
28102#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
28103#[doc = ""]
28104#[doc = "ID: 29"]
28105#[derive(Debug, Clone, PartialEq)]
28106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28108#[cfg_attr(feature = "ts", derive(TS))]
28109#[cfg_attr(feature = "ts", ts(export))]
28110pub struct SCALED_PRESSURE_DATA {
28111    #[doc = "Timestamp (time since system boot)."]
28112    pub time_boot_ms: u32,
28113    #[doc = "Absolute pressure"]
28114    pub press_abs: f32,
28115    #[doc = "Differential pressure 1"]
28116    pub press_diff: f32,
28117    #[doc = "Absolute pressure temperature"]
28118    pub temperature: i16,
28119    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28121    pub temperature_press_diff: i16,
28122}
28123impl SCALED_PRESSURE_DATA {
28124    pub const ENCODED_LEN: usize = 16usize;
28125    pub const DEFAULT: Self = Self {
28126        time_boot_ms: 0_u32,
28127        press_abs: 0.0_f32,
28128        press_diff: 0.0_f32,
28129        temperature: 0_i16,
28130        temperature_press_diff: 0_i16,
28131    };
28132    #[cfg(feature = "arbitrary")]
28133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28134        use arbitrary::{Arbitrary, Unstructured};
28135        let mut buf = [0u8; 1024];
28136        rng.fill_bytes(&mut buf);
28137        let mut unstructured = Unstructured::new(&buf);
28138        Self::arbitrary(&mut unstructured).unwrap_or_default()
28139    }
28140}
28141impl Default for SCALED_PRESSURE_DATA {
28142    fn default() -> Self {
28143        Self::DEFAULT.clone()
28144    }
28145}
28146impl MessageData for SCALED_PRESSURE_DATA {
28147    type Message = MavMessage;
28148    const ID: u32 = 29u32;
28149    const NAME: &'static str = "SCALED_PRESSURE";
28150    const EXTRA_CRC: u8 = 115u8;
28151    const ENCODED_LEN: usize = 16usize;
28152    fn deser(
28153        _version: MavlinkVersion,
28154        __input: &[u8],
28155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28156        let avail_len = __input.len();
28157        let mut payload_buf = [0; Self::ENCODED_LEN];
28158        let mut buf = if avail_len < Self::ENCODED_LEN {
28159            payload_buf[0..avail_len].copy_from_slice(__input);
28160            Bytes::new(&payload_buf)
28161        } else {
28162            Bytes::new(__input)
28163        };
28164        let mut __struct = Self::default();
28165        __struct.time_boot_ms = buf.get_u32_le();
28166        __struct.press_abs = buf.get_f32_le();
28167        __struct.press_diff = buf.get_f32_le();
28168        __struct.temperature = buf.get_i16_le();
28169        __struct.temperature_press_diff = buf.get_i16_le();
28170        Ok(__struct)
28171    }
28172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28173        let mut __tmp = BytesMut::new(bytes);
28174        #[allow(clippy::absurd_extreme_comparisons)]
28175        #[allow(unused_comparisons)]
28176        if __tmp.remaining() < Self::ENCODED_LEN {
28177            panic!(
28178                "buffer is too small (need {} bytes, but got {})",
28179                Self::ENCODED_LEN,
28180                __tmp.remaining(),
28181            )
28182        }
28183        __tmp.put_u32_le(self.time_boot_ms);
28184        __tmp.put_f32_le(self.press_abs);
28185        __tmp.put_f32_le(self.press_diff);
28186        __tmp.put_i16_le(self.temperature);
28187        if matches!(version, MavlinkVersion::V2) {
28188            __tmp.put_i16_le(self.temperature_press_diff);
28189            let len = __tmp.len();
28190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28191        } else {
28192            __tmp.len()
28193        }
28194    }
28195}
28196#[doc = "Barometer readings for 2nd barometer."]
28197#[doc = ""]
28198#[doc = "ID: 137"]
28199#[derive(Debug, Clone, PartialEq)]
28200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28202#[cfg_attr(feature = "ts", derive(TS))]
28203#[cfg_attr(feature = "ts", ts(export))]
28204pub struct SCALED_PRESSURE2_DATA {
28205    #[doc = "Timestamp (time since system boot)."]
28206    pub time_boot_ms: u32,
28207    #[doc = "Absolute pressure"]
28208    pub press_abs: f32,
28209    #[doc = "Differential pressure"]
28210    pub press_diff: f32,
28211    #[doc = "Absolute pressure temperature"]
28212    pub temperature: i16,
28213    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28214    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28215    pub temperature_press_diff: i16,
28216}
28217impl SCALED_PRESSURE2_DATA {
28218    pub const ENCODED_LEN: usize = 16usize;
28219    pub const DEFAULT: Self = Self {
28220        time_boot_ms: 0_u32,
28221        press_abs: 0.0_f32,
28222        press_diff: 0.0_f32,
28223        temperature: 0_i16,
28224        temperature_press_diff: 0_i16,
28225    };
28226    #[cfg(feature = "arbitrary")]
28227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28228        use arbitrary::{Arbitrary, Unstructured};
28229        let mut buf = [0u8; 1024];
28230        rng.fill_bytes(&mut buf);
28231        let mut unstructured = Unstructured::new(&buf);
28232        Self::arbitrary(&mut unstructured).unwrap_or_default()
28233    }
28234}
28235impl Default for SCALED_PRESSURE2_DATA {
28236    fn default() -> Self {
28237        Self::DEFAULT.clone()
28238    }
28239}
28240impl MessageData for SCALED_PRESSURE2_DATA {
28241    type Message = MavMessage;
28242    const ID: u32 = 137u32;
28243    const NAME: &'static str = "SCALED_PRESSURE2";
28244    const EXTRA_CRC: u8 = 195u8;
28245    const ENCODED_LEN: usize = 16usize;
28246    fn deser(
28247        _version: MavlinkVersion,
28248        __input: &[u8],
28249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28250        let avail_len = __input.len();
28251        let mut payload_buf = [0; Self::ENCODED_LEN];
28252        let mut buf = if avail_len < Self::ENCODED_LEN {
28253            payload_buf[0..avail_len].copy_from_slice(__input);
28254            Bytes::new(&payload_buf)
28255        } else {
28256            Bytes::new(__input)
28257        };
28258        let mut __struct = Self::default();
28259        __struct.time_boot_ms = buf.get_u32_le();
28260        __struct.press_abs = buf.get_f32_le();
28261        __struct.press_diff = buf.get_f32_le();
28262        __struct.temperature = buf.get_i16_le();
28263        __struct.temperature_press_diff = buf.get_i16_le();
28264        Ok(__struct)
28265    }
28266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28267        let mut __tmp = BytesMut::new(bytes);
28268        #[allow(clippy::absurd_extreme_comparisons)]
28269        #[allow(unused_comparisons)]
28270        if __tmp.remaining() < Self::ENCODED_LEN {
28271            panic!(
28272                "buffer is too small (need {} bytes, but got {})",
28273                Self::ENCODED_LEN,
28274                __tmp.remaining(),
28275            )
28276        }
28277        __tmp.put_u32_le(self.time_boot_ms);
28278        __tmp.put_f32_le(self.press_abs);
28279        __tmp.put_f32_le(self.press_diff);
28280        __tmp.put_i16_le(self.temperature);
28281        if matches!(version, MavlinkVersion::V2) {
28282            __tmp.put_i16_le(self.temperature_press_diff);
28283            let len = __tmp.len();
28284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28285        } else {
28286            __tmp.len()
28287        }
28288    }
28289}
28290#[doc = "Barometer readings for 3rd barometer."]
28291#[doc = ""]
28292#[doc = "ID: 143"]
28293#[derive(Debug, Clone, PartialEq)]
28294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28296#[cfg_attr(feature = "ts", derive(TS))]
28297#[cfg_attr(feature = "ts", ts(export))]
28298pub struct SCALED_PRESSURE3_DATA {
28299    #[doc = "Timestamp (time since system boot)."]
28300    pub time_boot_ms: u32,
28301    #[doc = "Absolute pressure"]
28302    pub press_abs: f32,
28303    #[doc = "Differential pressure"]
28304    pub press_diff: f32,
28305    #[doc = "Absolute pressure temperature"]
28306    pub temperature: i16,
28307    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28309    pub temperature_press_diff: i16,
28310}
28311impl SCALED_PRESSURE3_DATA {
28312    pub const ENCODED_LEN: usize = 16usize;
28313    pub const DEFAULT: Self = Self {
28314        time_boot_ms: 0_u32,
28315        press_abs: 0.0_f32,
28316        press_diff: 0.0_f32,
28317        temperature: 0_i16,
28318        temperature_press_diff: 0_i16,
28319    };
28320    #[cfg(feature = "arbitrary")]
28321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28322        use arbitrary::{Arbitrary, Unstructured};
28323        let mut buf = [0u8; 1024];
28324        rng.fill_bytes(&mut buf);
28325        let mut unstructured = Unstructured::new(&buf);
28326        Self::arbitrary(&mut unstructured).unwrap_or_default()
28327    }
28328}
28329impl Default for SCALED_PRESSURE3_DATA {
28330    fn default() -> Self {
28331        Self::DEFAULT.clone()
28332    }
28333}
28334impl MessageData for SCALED_PRESSURE3_DATA {
28335    type Message = MavMessage;
28336    const ID: u32 = 143u32;
28337    const NAME: &'static str = "SCALED_PRESSURE3";
28338    const EXTRA_CRC: u8 = 131u8;
28339    const ENCODED_LEN: usize = 16usize;
28340    fn deser(
28341        _version: MavlinkVersion,
28342        __input: &[u8],
28343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28344        let avail_len = __input.len();
28345        let mut payload_buf = [0; Self::ENCODED_LEN];
28346        let mut buf = if avail_len < Self::ENCODED_LEN {
28347            payload_buf[0..avail_len].copy_from_slice(__input);
28348            Bytes::new(&payload_buf)
28349        } else {
28350            Bytes::new(__input)
28351        };
28352        let mut __struct = Self::default();
28353        __struct.time_boot_ms = buf.get_u32_le();
28354        __struct.press_abs = buf.get_f32_le();
28355        __struct.press_diff = buf.get_f32_le();
28356        __struct.temperature = buf.get_i16_le();
28357        __struct.temperature_press_diff = buf.get_i16_le();
28358        Ok(__struct)
28359    }
28360    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28361        let mut __tmp = BytesMut::new(bytes);
28362        #[allow(clippy::absurd_extreme_comparisons)]
28363        #[allow(unused_comparisons)]
28364        if __tmp.remaining() < Self::ENCODED_LEN {
28365            panic!(
28366                "buffer is too small (need {} bytes, but got {})",
28367                Self::ENCODED_LEN,
28368                __tmp.remaining(),
28369            )
28370        }
28371        __tmp.put_u32_le(self.time_boot_ms);
28372        __tmp.put_f32_le(self.press_abs);
28373        __tmp.put_f32_le(self.press_diff);
28374        __tmp.put_i16_le(self.temperature);
28375        if matches!(version, MavlinkVersion::V2) {
28376            __tmp.put_i16_le(self.temperature_press_diff);
28377            let len = __tmp.len();
28378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28379        } else {
28380            __tmp.len()
28381        }
28382    }
28383}
28384#[doc = "Monitoring of sensorpod status."]
28385#[doc = ""]
28386#[doc = "ID: 8012"]
28387#[derive(Debug, Clone, PartialEq)]
28388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28390#[cfg_attr(feature = "ts", derive(TS))]
28391#[cfg_attr(feature = "ts", ts(export))]
28392pub struct SENSORPOD_STATUS_DATA {
28393    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
28394    pub timestamp: u64,
28395    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
28396    pub free_space: u16,
28397    #[doc = "Rate of ROS topic 1"]
28398    pub visensor_rate_1: u8,
28399    #[doc = "Rate of ROS topic 2"]
28400    pub visensor_rate_2: u8,
28401    #[doc = "Rate of ROS topic 3"]
28402    pub visensor_rate_3: u8,
28403    #[doc = "Rate of ROS topic 4"]
28404    pub visensor_rate_4: u8,
28405    #[doc = "Number of recording nodes"]
28406    pub recording_nodes_count: u8,
28407    #[doc = "Temperature of sensorpod CPU in"]
28408    pub cpu_temp: u8,
28409}
28410impl SENSORPOD_STATUS_DATA {
28411    pub const ENCODED_LEN: usize = 16usize;
28412    pub const DEFAULT: Self = Self {
28413        timestamp: 0_u64,
28414        free_space: 0_u16,
28415        visensor_rate_1: 0_u8,
28416        visensor_rate_2: 0_u8,
28417        visensor_rate_3: 0_u8,
28418        visensor_rate_4: 0_u8,
28419        recording_nodes_count: 0_u8,
28420        cpu_temp: 0_u8,
28421    };
28422    #[cfg(feature = "arbitrary")]
28423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28424        use arbitrary::{Arbitrary, Unstructured};
28425        let mut buf = [0u8; 1024];
28426        rng.fill_bytes(&mut buf);
28427        let mut unstructured = Unstructured::new(&buf);
28428        Self::arbitrary(&mut unstructured).unwrap_or_default()
28429    }
28430}
28431impl Default for SENSORPOD_STATUS_DATA {
28432    fn default() -> Self {
28433        Self::DEFAULT.clone()
28434    }
28435}
28436impl MessageData for SENSORPOD_STATUS_DATA {
28437    type Message = MavMessage;
28438    const ID: u32 = 8012u32;
28439    const NAME: &'static str = "SENSORPOD_STATUS";
28440    const EXTRA_CRC: u8 = 54u8;
28441    const ENCODED_LEN: usize = 16usize;
28442    fn deser(
28443        _version: MavlinkVersion,
28444        __input: &[u8],
28445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28446        let avail_len = __input.len();
28447        let mut payload_buf = [0; Self::ENCODED_LEN];
28448        let mut buf = if avail_len < Self::ENCODED_LEN {
28449            payload_buf[0..avail_len].copy_from_slice(__input);
28450            Bytes::new(&payload_buf)
28451        } else {
28452            Bytes::new(__input)
28453        };
28454        let mut __struct = Self::default();
28455        __struct.timestamp = buf.get_u64_le();
28456        __struct.free_space = buf.get_u16_le();
28457        __struct.visensor_rate_1 = buf.get_u8();
28458        __struct.visensor_rate_2 = buf.get_u8();
28459        __struct.visensor_rate_3 = buf.get_u8();
28460        __struct.visensor_rate_4 = buf.get_u8();
28461        __struct.recording_nodes_count = buf.get_u8();
28462        __struct.cpu_temp = buf.get_u8();
28463        Ok(__struct)
28464    }
28465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28466        let mut __tmp = BytesMut::new(bytes);
28467        #[allow(clippy::absurd_extreme_comparisons)]
28468        #[allow(unused_comparisons)]
28469        if __tmp.remaining() < Self::ENCODED_LEN {
28470            panic!(
28471                "buffer is too small (need {} bytes, but got {})",
28472                Self::ENCODED_LEN,
28473                __tmp.remaining(),
28474            )
28475        }
28476        __tmp.put_u64_le(self.timestamp);
28477        __tmp.put_u16_le(self.free_space);
28478        __tmp.put_u8(self.visensor_rate_1);
28479        __tmp.put_u8(self.visensor_rate_2);
28480        __tmp.put_u8(self.visensor_rate_3);
28481        __tmp.put_u8(self.visensor_rate_4);
28482        __tmp.put_u8(self.recording_nodes_count);
28483        __tmp.put_u8(self.cpu_temp);
28484        if matches!(version, MavlinkVersion::V2) {
28485            let len = __tmp.len();
28486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28487        } else {
28488            __tmp.len()
28489        }
28490    }
28491}
28492#[doc = "Calibrated airflow angle measurements."]
28493#[doc = ""]
28494#[doc = "ID: 8016"]
28495#[derive(Debug, Clone, PartialEq)]
28496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28498#[cfg_attr(feature = "ts", derive(TS))]
28499#[cfg_attr(feature = "ts", ts(export))]
28500pub struct SENSOR_AIRFLOW_ANGLES_DATA {
28501    #[doc = "Timestamp"]
28502    pub timestamp: u64,
28503    #[doc = "Angle of attack"]
28504    pub angleofattack: f32,
28505    #[doc = "Sideslip angle"]
28506    pub sideslip: f32,
28507    #[doc = "Angle of attack measurement valid"]
28508    pub angleofattack_valid: u8,
28509    #[doc = "Sideslip angle measurement valid"]
28510    pub sideslip_valid: u8,
28511}
28512impl SENSOR_AIRFLOW_ANGLES_DATA {
28513    pub const ENCODED_LEN: usize = 18usize;
28514    pub const DEFAULT: Self = Self {
28515        timestamp: 0_u64,
28516        angleofattack: 0.0_f32,
28517        sideslip: 0.0_f32,
28518        angleofattack_valid: 0_u8,
28519        sideslip_valid: 0_u8,
28520    };
28521    #[cfg(feature = "arbitrary")]
28522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28523        use arbitrary::{Arbitrary, Unstructured};
28524        let mut buf = [0u8; 1024];
28525        rng.fill_bytes(&mut buf);
28526        let mut unstructured = Unstructured::new(&buf);
28527        Self::arbitrary(&mut unstructured).unwrap_or_default()
28528    }
28529}
28530impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
28531    fn default() -> Self {
28532        Self::DEFAULT.clone()
28533    }
28534}
28535impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
28536    type Message = MavMessage;
28537    const ID: u32 = 8016u32;
28538    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
28539    const EXTRA_CRC: u8 = 149u8;
28540    const ENCODED_LEN: usize = 18usize;
28541    fn deser(
28542        _version: MavlinkVersion,
28543        __input: &[u8],
28544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28545        let avail_len = __input.len();
28546        let mut payload_buf = [0; Self::ENCODED_LEN];
28547        let mut buf = if avail_len < Self::ENCODED_LEN {
28548            payload_buf[0..avail_len].copy_from_slice(__input);
28549            Bytes::new(&payload_buf)
28550        } else {
28551            Bytes::new(__input)
28552        };
28553        let mut __struct = Self::default();
28554        __struct.timestamp = buf.get_u64_le();
28555        __struct.angleofattack = buf.get_f32_le();
28556        __struct.sideslip = buf.get_f32_le();
28557        __struct.angleofattack_valid = buf.get_u8();
28558        __struct.sideslip_valid = buf.get_u8();
28559        Ok(__struct)
28560    }
28561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28562        let mut __tmp = BytesMut::new(bytes);
28563        #[allow(clippy::absurd_extreme_comparisons)]
28564        #[allow(unused_comparisons)]
28565        if __tmp.remaining() < Self::ENCODED_LEN {
28566            panic!(
28567                "buffer is too small (need {} bytes, but got {})",
28568                Self::ENCODED_LEN,
28569                __tmp.remaining(),
28570            )
28571        }
28572        __tmp.put_u64_le(self.timestamp);
28573        __tmp.put_f32_le(self.angleofattack);
28574        __tmp.put_f32_le(self.sideslip);
28575        __tmp.put_u8(self.angleofattack_valid);
28576        __tmp.put_u8(self.sideslip_valid);
28577        if matches!(version, MavlinkVersion::V2) {
28578            let len = __tmp.len();
28579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28580        } else {
28581            __tmp.len()
28582        }
28583    }
28584}
28585#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
28586#[doc = ""]
28587#[doc = "ID: 8009"]
28588#[derive(Debug, Clone, PartialEq)]
28589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28591#[cfg_attr(feature = "ts", derive(TS))]
28592#[cfg_attr(feature = "ts", ts(export))]
28593pub struct SENS_ATMOS_DATA {
28594    #[doc = "Time since system boot"]
28595    pub timestamp: u64,
28596    #[doc = "Ambient temperature"]
28597    pub TempAmbient: f32,
28598    #[doc = "Relative humidity"]
28599    pub Humidity: f32,
28600}
28601impl SENS_ATMOS_DATA {
28602    pub const ENCODED_LEN: usize = 16usize;
28603    pub const DEFAULT: Self = Self {
28604        timestamp: 0_u64,
28605        TempAmbient: 0.0_f32,
28606        Humidity: 0.0_f32,
28607    };
28608    #[cfg(feature = "arbitrary")]
28609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28610        use arbitrary::{Arbitrary, Unstructured};
28611        let mut buf = [0u8; 1024];
28612        rng.fill_bytes(&mut buf);
28613        let mut unstructured = Unstructured::new(&buf);
28614        Self::arbitrary(&mut unstructured).unwrap_or_default()
28615    }
28616}
28617impl Default for SENS_ATMOS_DATA {
28618    fn default() -> Self {
28619        Self::DEFAULT.clone()
28620    }
28621}
28622impl MessageData for SENS_ATMOS_DATA {
28623    type Message = MavMessage;
28624    const ID: u32 = 8009u32;
28625    const NAME: &'static str = "SENS_ATMOS";
28626    const EXTRA_CRC: u8 = 144u8;
28627    const ENCODED_LEN: usize = 16usize;
28628    fn deser(
28629        _version: MavlinkVersion,
28630        __input: &[u8],
28631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28632        let avail_len = __input.len();
28633        let mut payload_buf = [0; Self::ENCODED_LEN];
28634        let mut buf = if avail_len < Self::ENCODED_LEN {
28635            payload_buf[0..avail_len].copy_from_slice(__input);
28636            Bytes::new(&payload_buf)
28637        } else {
28638            Bytes::new(__input)
28639        };
28640        let mut __struct = Self::default();
28641        __struct.timestamp = buf.get_u64_le();
28642        __struct.TempAmbient = buf.get_f32_le();
28643        __struct.Humidity = buf.get_f32_le();
28644        Ok(__struct)
28645    }
28646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28647        let mut __tmp = BytesMut::new(bytes);
28648        #[allow(clippy::absurd_extreme_comparisons)]
28649        #[allow(unused_comparisons)]
28650        if __tmp.remaining() < Self::ENCODED_LEN {
28651            panic!(
28652                "buffer is too small (need {} bytes, but got {})",
28653                Self::ENCODED_LEN,
28654                __tmp.remaining(),
28655            )
28656        }
28657        __tmp.put_u64_le(self.timestamp);
28658        __tmp.put_f32_le(self.TempAmbient);
28659        __tmp.put_f32_le(self.Humidity);
28660        if matches!(version, MavlinkVersion::V2) {
28661            let len = __tmp.len();
28662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28663        } else {
28664            __tmp.len()
28665        }
28666    }
28667}
28668#[doc = "Battery pack monitoring data for Li-Ion batteries."]
28669#[doc = ""]
28670#[doc = "ID: 8010"]
28671#[derive(Debug, Clone, PartialEq)]
28672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28674#[cfg_attr(feature = "ts", derive(TS))]
28675#[cfg_attr(feature = "ts", ts(export))]
28676pub struct SENS_BATMON_DATA {
28677    #[doc = "Time since system start"]
28678    pub batmon_timestamp: u64,
28679    #[doc = "Battery pack temperature"]
28680    pub temperature: f32,
28681    #[doc = "Battery monitor safetystatus report bits in Hex"]
28682    pub safetystatus: u32,
28683    #[doc = "Battery monitor operation status report bits in Hex"]
28684    pub operationstatus: u32,
28685    #[doc = "Battery pack voltage"]
28686    pub voltage: u16,
28687    #[doc = "Battery pack current"]
28688    pub current: i16,
28689    #[doc = "Battery monitor status report bits in Hex"]
28690    pub batterystatus: u16,
28691    #[doc = "Battery monitor serial number in Hex"]
28692    pub serialnumber: u16,
28693    #[doc = "Battery pack cell 1 voltage"]
28694    pub cellvoltage1: u16,
28695    #[doc = "Battery pack cell 2 voltage"]
28696    pub cellvoltage2: u16,
28697    #[doc = "Battery pack cell 3 voltage"]
28698    pub cellvoltage3: u16,
28699    #[doc = "Battery pack cell 4 voltage"]
28700    pub cellvoltage4: u16,
28701    #[doc = "Battery pack cell 5 voltage"]
28702    pub cellvoltage5: u16,
28703    #[doc = "Battery pack cell 6 voltage"]
28704    pub cellvoltage6: u16,
28705    #[doc = "Battery pack state-of-charge"]
28706    pub SoC: u8,
28707}
28708impl SENS_BATMON_DATA {
28709    pub const ENCODED_LEN: usize = 41usize;
28710    pub const DEFAULT: Self = Self {
28711        batmon_timestamp: 0_u64,
28712        temperature: 0.0_f32,
28713        safetystatus: 0_u32,
28714        operationstatus: 0_u32,
28715        voltage: 0_u16,
28716        current: 0_i16,
28717        batterystatus: 0_u16,
28718        serialnumber: 0_u16,
28719        cellvoltage1: 0_u16,
28720        cellvoltage2: 0_u16,
28721        cellvoltage3: 0_u16,
28722        cellvoltage4: 0_u16,
28723        cellvoltage5: 0_u16,
28724        cellvoltage6: 0_u16,
28725        SoC: 0_u8,
28726    };
28727    #[cfg(feature = "arbitrary")]
28728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28729        use arbitrary::{Arbitrary, Unstructured};
28730        let mut buf = [0u8; 1024];
28731        rng.fill_bytes(&mut buf);
28732        let mut unstructured = Unstructured::new(&buf);
28733        Self::arbitrary(&mut unstructured).unwrap_or_default()
28734    }
28735}
28736impl Default for SENS_BATMON_DATA {
28737    fn default() -> Self {
28738        Self::DEFAULT.clone()
28739    }
28740}
28741impl MessageData for SENS_BATMON_DATA {
28742    type Message = MavMessage;
28743    const ID: u32 = 8010u32;
28744    const NAME: &'static str = "SENS_BATMON";
28745    const EXTRA_CRC: u8 = 155u8;
28746    const ENCODED_LEN: usize = 41usize;
28747    fn deser(
28748        _version: MavlinkVersion,
28749        __input: &[u8],
28750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28751        let avail_len = __input.len();
28752        let mut payload_buf = [0; Self::ENCODED_LEN];
28753        let mut buf = if avail_len < Self::ENCODED_LEN {
28754            payload_buf[0..avail_len].copy_from_slice(__input);
28755            Bytes::new(&payload_buf)
28756        } else {
28757            Bytes::new(__input)
28758        };
28759        let mut __struct = Self::default();
28760        __struct.batmon_timestamp = buf.get_u64_le();
28761        __struct.temperature = buf.get_f32_le();
28762        __struct.safetystatus = buf.get_u32_le();
28763        __struct.operationstatus = buf.get_u32_le();
28764        __struct.voltage = buf.get_u16_le();
28765        __struct.current = buf.get_i16_le();
28766        __struct.batterystatus = buf.get_u16_le();
28767        __struct.serialnumber = buf.get_u16_le();
28768        __struct.cellvoltage1 = buf.get_u16_le();
28769        __struct.cellvoltage2 = buf.get_u16_le();
28770        __struct.cellvoltage3 = buf.get_u16_le();
28771        __struct.cellvoltage4 = buf.get_u16_le();
28772        __struct.cellvoltage5 = buf.get_u16_le();
28773        __struct.cellvoltage6 = buf.get_u16_le();
28774        __struct.SoC = buf.get_u8();
28775        Ok(__struct)
28776    }
28777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28778        let mut __tmp = BytesMut::new(bytes);
28779        #[allow(clippy::absurd_extreme_comparisons)]
28780        #[allow(unused_comparisons)]
28781        if __tmp.remaining() < Self::ENCODED_LEN {
28782            panic!(
28783                "buffer is too small (need {} bytes, but got {})",
28784                Self::ENCODED_LEN,
28785                __tmp.remaining(),
28786            )
28787        }
28788        __tmp.put_u64_le(self.batmon_timestamp);
28789        __tmp.put_f32_le(self.temperature);
28790        __tmp.put_u32_le(self.safetystatus);
28791        __tmp.put_u32_le(self.operationstatus);
28792        __tmp.put_u16_le(self.voltage);
28793        __tmp.put_i16_le(self.current);
28794        __tmp.put_u16_le(self.batterystatus);
28795        __tmp.put_u16_le(self.serialnumber);
28796        __tmp.put_u16_le(self.cellvoltage1);
28797        __tmp.put_u16_le(self.cellvoltage2);
28798        __tmp.put_u16_le(self.cellvoltage3);
28799        __tmp.put_u16_le(self.cellvoltage4);
28800        __tmp.put_u16_le(self.cellvoltage5);
28801        __tmp.put_u16_le(self.cellvoltage6);
28802        __tmp.put_u8(self.SoC);
28803        if matches!(version, MavlinkVersion::V2) {
28804            let len = __tmp.len();
28805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28806        } else {
28807            __tmp.len()
28808        }
28809    }
28810}
28811#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
28812#[doc = ""]
28813#[doc = "ID: 8003"]
28814#[derive(Debug, Clone, PartialEq)]
28815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28817#[cfg_attr(feature = "ts", derive(TS))]
28818#[cfg_attr(feature = "ts", ts(export))]
28819pub struct SENS_MPPT_DATA {
28820    #[doc = "MPPT last timestamp"]
28821    pub mppt_timestamp: u64,
28822    #[doc = "MPPT1 voltage"]
28823    pub mppt1_volt: f32,
28824    #[doc = "MPPT1 current"]
28825    pub mppt1_amp: f32,
28826    #[doc = "MPPT2 voltage"]
28827    pub mppt2_volt: f32,
28828    #[doc = "MPPT2 current"]
28829    pub mppt2_amp: f32,
28830    #[doc = "MPPT3 voltage"]
28831    pub mppt3_volt: f32,
28832    #[doc = "MPPT3 current"]
28833    pub mppt3_amp: f32,
28834    #[doc = "MPPT1 pwm"]
28835    pub mppt1_pwm: u16,
28836    #[doc = "MPPT2 pwm"]
28837    pub mppt2_pwm: u16,
28838    #[doc = "MPPT3 pwm"]
28839    pub mppt3_pwm: u16,
28840    #[doc = "MPPT1 status"]
28841    pub mppt1_status: u8,
28842    #[doc = "MPPT2 status"]
28843    pub mppt2_status: u8,
28844    #[doc = "MPPT3 status"]
28845    pub mppt3_status: u8,
28846}
28847impl SENS_MPPT_DATA {
28848    pub const ENCODED_LEN: usize = 41usize;
28849    pub const DEFAULT: Self = Self {
28850        mppt_timestamp: 0_u64,
28851        mppt1_volt: 0.0_f32,
28852        mppt1_amp: 0.0_f32,
28853        mppt2_volt: 0.0_f32,
28854        mppt2_amp: 0.0_f32,
28855        mppt3_volt: 0.0_f32,
28856        mppt3_amp: 0.0_f32,
28857        mppt1_pwm: 0_u16,
28858        mppt2_pwm: 0_u16,
28859        mppt3_pwm: 0_u16,
28860        mppt1_status: 0_u8,
28861        mppt2_status: 0_u8,
28862        mppt3_status: 0_u8,
28863    };
28864    #[cfg(feature = "arbitrary")]
28865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28866        use arbitrary::{Arbitrary, Unstructured};
28867        let mut buf = [0u8; 1024];
28868        rng.fill_bytes(&mut buf);
28869        let mut unstructured = Unstructured::new(&buf);
28870        Self::arbitrary(&mut unstructured).unwrap_or_default()
28871    }
28872}
28873impl Default for SENS_MPPT_DATA {
28874    fn default() -> Self {
28875        Self::DEFAULT.clone()
28876    }
28877}
28878impl MessageData for SENS_MPPT_DATA {
28879    type Message = MavMessage;
28880    const ID: u32 = 8003u32;
28881    const NAME: &'static str = "SENS_MPPT";
28882    const EXTRA_CRC: u8 = 231u8;
28883    const ENCODED_LEN: usize = 41usize;
28884    fn deser(
28885        _version: MavlinkVersion,
28886        __input: &[u8],
28887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28888        let avail_len = __input.len();
28889        let mut payload_buf = [0; Self::ENCODED_LEN];
28890        let mut buf = if avail_len < Self::ENCODED_LEN {
28891            payload_buf[0..avail_len].copy_from_slice(__input);
28892            Bytes::new(&payload_buf)
28893        } else {
28894            Bytes::new(__input)
28895        };
28896        let mut __struct = Self::default();
28897        __struct.mppt_timestamp = buf.get_u64_le();
28898        __struct.mppt1_volt = buf.get_f32_le();
28899        __struct.mppt1_amp = buf.get_f32_le();
28900        __struct.mppt2_volt = buf.get_f32_le();
28901        __struct.mppt2_amp = buf.get_f32_le();
28902        __struct.mppt3_volt = buf.get_f32_le();
28903        __struct.mppt3_amp = buf.get_f32_le();
28904        __struct.mppt1_pwm = buf.get_u16_le();
28905        __struct.mppt2_pwm = buf.get_u16_le();
28906        __struct.mppt3_pwm = buf.get_u16_le();
28907        __struct.mppt1_status = buf.get_u8();
28908        __struct.mppt2_status = buf.get_u8();
28909        __struct.mppt3_status = buf.get_u8();
28910        Ok(__struct)
28911    }
28912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28913        let mut __tmp = BytesMut::new(bytes);
28914        #[allow(clippy::absurd_extreme_comparisons)]
28915        #[allow(unused_comparisons)]
28916        if __tmp.remaining() < Self::ENCODED_LEN {
28917            panic!(
28918                "buffer is too small (need {} bytes, but got {})",
28919                Self::ENCODED_LEN,
28920                __tmp.remaining(),
28921            )
28922        }
28923        __tmp.put_u64_le(self.mppt_timestamp);
28924        __tmp.put_f32_le(self.mppt1_volt);
28925        __tmp.put_f32_le(self.mppt1_amp);
28926        __tmp.put_f32_le(self.mppt2_volt);
28927        __tmp.put_f32_le(self.mppt2_amp);
28928        __tmp.put_f32_le(self.mppt3_volt);
28929        __tmp.put_f32_le(self.mppt3_amp);
28930        __tmp.put_u16_le(self.mppt1_pwm);
28931        __tmp.put_u16_le(self.mppt2_pwm);
28932        __tmp.put_u16_le(self.mppt3_pwm);
28933        __tmp.put_u8(self.mppt1_status);
28934        __tmp.put_u8(self.mppt2_status);
28935        __tmp.put_u8(self.mppt3_status);
28936        if matches!(version, MavlinkVersion::V2) {
28937            let len = __tmp.len();
28938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28939        } else {
28940            __tmp.len()
28941        }
28942    }
28943}
28944#[doc = "Voltage and current sensor data."]
28945#[doc = ""]
28946#[doc = "ID: 8002"]
28947#[derive(Debug, Clone, PartialEq)]
28948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28950#[cfg_attr(feature = "ts", derive(TS))]
28951#[cfg_attr(feature = "ts", ts(export))]
28952pub struct SENS_POWER_DATA {
28953    #[doc = "Power board voltage sensor reading"]
28954    pub adc121_vspb_volt: f32,
28955    #[doc = "Power board current sensor reading"]
28956    pub adc121_cspb_amp: f32,
28957    #[doc = "Board current sensor 1 reading"]
28958    pub adc121_cs1_amp: f32,
28959    #[doc = "Board current sensor 2 reading"]
28960    pub adc121_cs2_amp: f32,
28961}
28962impl SENS_POWER_DATA {
28963    pub const ENCODED_LEN: usize = 16usize;
28964    pub const DEFAULT: Self = Self {
28965        adc121_vspb_volt: 0.0_f32,
28966        adc121_cspb_amp: 0.0_f32,
28967        adc121_cs1_amp: 0.0_f32,
28968        adc121_cs2_amp: 0.0_f32,
28969    };
28970    #[cfg(feature = "arbitrary")]
28971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28972        use arbitrary::{Arbitrary, Unstructured};
28973        let mut buf = [0u8; 1024];
28974        rng.fill_bytes(&mut buf);
28975        let mut unstructured = Unstructured::new(&buf);
28976        Self::arbitrary(&mut unstructured).unwrap_or_default()
28977    }
28978}
28979impl Default for SENS_POWER_DATA {
28980    fn default() -> Self {
28981        Self::DEFAULT.clone()
28982    }
28983}
28984impl MessageData for SENS_POWER_DATA {
28985    type Message = MavMessage;
28986    const ID: u32 = 8002u32;
28987    const NAME: &'static str = "SENS_POWER";
28988    const EXTRA_CRC: u8 = 218u8;
28989    const ENCODED_LEN: usize = 16usize;
28990    fn deser(
28991        _version: MavlinkVersion,
28992        __input: &[u8],
28993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28994        let avail_len = __input.len();
28995        let mut payload_buf = [0; Self::ENCODED_LEN];
28996        let mut buf = if avail_len < Self::ENCODED_LEN {
28997            payload_buf[0..avail_len].copy_from_slice(__input);
28998            Bytes::new(&payload_buf)
28999        } else {
29000            Bytes::new(__input)
29001        };
29002        let mut __struct = Self::default();
29003        __struct.adc121_vspb_volt = buf.get_f32_le();
29004        __struct.adc121_cspb_amp = buf.get_f32_le();
29005        __struct.adc121_cs1_amp = buf.get_f32_le();
29006        __struct.adc121_cs2_amp = buf.get_f32_le();
29007        Ok(__struct)
29008    }
29009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29010        let mut __tmp = BytesMut::new(bytes);
29011        #[allow(clippy::absurd_extreme_comparisons)]
29012        #[allow(unused_comparisons)]
29013        if __tmp.remaining() < Self::ENCODED_LEN {
29014            panic!(
29015                "buffer is too small (need {} bytes, but got {})",
29016                Self::ENCODED_LEN,
29017                __tmp.remaining(),
29018            )
29019        }
29020        __tmp.put_f32_le(self.adc121_vspb_volt);
29021        __tmp.put_f32_le(self.adc121_cspb_amp);
29022        __tmp.put_f32_le(self.adc121_cs1_amp);
29023        __tmp.put_f32_le(self.adc121_cs2_amp);
29024        if matches!(version, MavlinkVersion::V2) {
29025            let len = __tmp.len();
29026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29027        } else {
29028            __tmp.len()
29029        }
29030    }
29031}
29032#[doc = "Monitoring of power board status."]
29033#[doc = ""]
29034#[doc = "ID: 8013"]
29035#[derive(Debug, Clone, PartialEq)]
29036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29038#[cfg_attr(feature = "ts", derive(TS))]
29039#[cfg_attr(feature = "ts", ts(export))]
29040pub struct SENS_POWER_BOARD_DATA {
29041    #[doc = "Timestamp"]
29042    pub timestamp: u64,
29043    #[doc = "Power board system voltage"]
29044    pub pwr_brd_system_volt: f32,
29045    #[doc = "Power board servo voltage"]
29046    pub pwr_brd_servo_volt: f32,
29047    #[doc = "Power board digital voltage"]
29048    pub pwr_brd_digital_volt: f32,
29049    #[doc = "Power board left motor current sensor"]
29050    pub pwr_brd_mot_l_amp: f32,
29051    #[doc = "Power board right motor current sensor"]
29052    pub pwr_brd_mot_r_amp: f32,
29053    #[doc = "Power board analog current sensor"]
29054    pub pwr_brd_analog_amp: f32,
29055    #[doc = "Power board digital current sensor"]
29056    pub pwr_brd_digital_amp: f32,
29057    #[doc = "Power board extension current sensor"]
29058    pub pwr_brd_ext_amp: f32,
29059    #[doc = "Power board aux current sensor"]
29060    pub pwr_brd_aux_amp: f32,
29061    #[doc = "Power board status register"]
29062    pub pwr_brd_status: u8,
29063    #[doc = "Power board leds status"]
29064    pub pwr_brd_led_status: u8,
29065}
29066impl SENS_POWER_BOARD_DATA {
29067    pub const ENCODED_LEN: usize = 46usize;
29068    pub const DEFAULT: Self = Self {
29069        timestamp: 0_u64,
29070        pwr_brd_system_volt: 0.0_f32,
29071        pwr_brd_servo_volt: 0.0_f32,
29072        pwr_brd_digital_volt: 0.0_f32,
29073        pwr_brd_mot_l_amp: 0.0_f32,
29074        pwr_brd_mot_r_amp: 0.0_f32,
29075        pwr_brd_analog_amp: 0.0_f32,
29076        pwr_brd_digital_amp: 0.0_f32,
29077        pwr_brd_ext_amp: 0.0_f32,
29078        pwr_brd_aux_amp: 0.0_f32,
29079        pwr_brd_status: 0_u8,
29080        pwr_brd_led_status: 0_u8,
29081    };
29082    #[cfg(feature = "arbitrary")]
29083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29084        use arbitrary::{Arbitrary, Unstructured};
29085        let mut buf = [0u8; 1024];
29086        rng.fill_bytes(&mut buf);
29087        let mut unstructured = Unstructured::new(&buf);
29088        Self::arbitrary(&mut unstructured).unwrap_or_default()
29089    }
29090}
29091impl Default for SENS_POWER_BOARD_DATA {
29092    fn default() -> Self {
29093        Self::DEFAULT.clone()
29094    }
29095}
29096impl MessageData for SENS_POWER_BOARD_DATA {
29097    type Message = MavMessage;
29098    const ID: u32 = 8013u32;
29099    const NAME: &'static str = "SENS_POWER_BOARD";
29100    const EXTRA_CRC: u8 = 222u8;
29101    const ENCODED_LEN: usize = 46usize;
29102    fn deser(
29103        _version: MavlinkVersion,
29104        __input: &[u8],
29105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29106        let avail_len = __input.len();
29107        let mut payload_buf = [0; Self::ENCODED_LEN];
29108        let mut buf = if avail_len < Self::ENCODED_LEN {
29109            payload_buf[0..avail_len].copy_from_slice(__input);
29110            Bytes::new(&payload_buf)
29111        } else {
29112            Bytes::new(__input)
29113        };
29114        let mut __struct = Self::default();
29115        __struct.timestamp = buf.get_u64_le();
29116        __struct.pwr_brd_system_volt = buf.get_f32_le();
29117        __struct.pwr_brd_servo_volt = buf.get_f32_le();
29118        __struct.pwr_brd_digital_volt = buf.get_f32_le();
29119        __struct.pwr_brd_mot_l_amp = buf.get_f32_le();
29120        __struct.pwr_brd_mot_r_amp = buf.get_f32_le();
29121        __struct.pwr_brd_analog_amp = buf.get_f32_le();
29122        __struct.pwr_brd_digital_amp = buf.get_f32_le();
29123        __struct.pwr_brd_ext_amp = buf.get_f32_le();
29124        __struct.pwr_brd_aux_amp = buf.get_f32_le();
29125        __struct.pwr_brd_status = buf.get_u8();
29126        __struct.pwr_brd_led_status = buf.get_u8();
29127        Ok(__struct)
29128    }
29129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29130        let mut __tmp = BytesMut::new(bytes);
29131        #[allow(clippy::absurd_extreme_comparisons)]
29132        #[allow(unused_comparisons)]
29133        if __tmp.remaining() < Self::ENCODED_LEN {
29134            panic!(
29135                "buffer is too small (need {} bytes, but got {})",
29136                Self::ENCODED_LEN,
29137                __tmp.remaining(),
29138            )
29139        }
29140        __tmp.put_u64_le(self.timestamp);
29141        __tmp.put_f32_le(self.pwr_brd_system_volt);
29142        __tmp.put_f32_le(self.pwr_brd_servo_volt);
29143        __tmp.put_f32_le(self.pwr_brd_digital_volt);
29144        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
29145        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
29146        __tmp.put_f32_le(self.pwr_brd_analog_amp);
29147        __tmp.put_f32_le(self.pwr_brd_digital_amp);
29148        __tmp.put_f32_le(self.pwr_brd_ext_amp);
29149        __tmp.put_f32_le(self.pwr_brd_aux_amp);
29150        __tmp.put_u8(self.pwr_brd_status);
29151        __tmp.put_u8(self.pwr_brd_led_status);
29152        if matches!(version, MavlinkVersion::V2) {
29153            let len = __tmp.len();
29154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29155        } else {
29156            __tmp.len()
29157        }
29158    }
29159}
29160#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29161#[doc = ""]
29162#[doc = "ID: 126"]
29163#[derive(Debug, Clone, PartialEq)]
29164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29166#[cfg_attr(feature = "ts", derive(TS))]
29167#[cfg_attr(feature = "ts", ts(export))]
29168pub struct SERIAL_CONTROL_DATA {
29169    #[doc = "Baudrate of transfer. Zero means no change."]
29170    pub baudrate: u32,
29171    #[doc = "Timeout for reply data"]
29172    pub timeout: u16,
29173    #[doc = "Serial control device type."]
29174    pub device: SerialControlDev,
29175    #[doc = "Bitmap of serial control flags."]
29176    pub flags: SerialControlFlag,
29177    #[doc = "how many bytes in this transfer"]
29178    pub count: u8,
29179    #[doc = "serial data"]
29180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29182    pub data: [u8; 70],
29183    #[doc = "System ID"]
29184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29185    pub target_system: u8,
29186    #[doc = "Component ID"]
29187    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29188    pub target_component: u8,
29189}
29190impl SERIAL_CONTROL_DATA {
29191    pub const ENCODED_LEN: usize = 81usize;
29192    pub const DEFAULT: Self = Self {
29193        baudrate: 0_u32,
29194        timeout: 0_u16,
29195        device: SerialControlDev::DEFAULT,
29196        flags: SerialControlFlag::DEFAULT,
29197        count: 0_u8,
29198        data: [0_u8; 70usize],
29199        target_system: 0_u8,
29200        target_component: 0_u8,
29201    };
29202    #[cfg(feature = "arbitrary")]
29203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29204        use arbitrary::{Arbitrary, Unstructured};
29205        let mut buf = [0u8; 1024];
29206        rng.fill_bytes(&mut buf);
29207        let mut unstructured = Unstructured::new(&buf);
29208        Self::arbitrary(&mut unstructured).unwrap_or_default()
29209    }
29210}
29211impl Default for SERIAL_CONTROL_DATA {
29212    fn default() -> Self {
29213        Self::DEFAULT.clone()
29214    }
29215}
29216impl MessageData for SERIAL_CONTROL_DATA {
29217    type Message = MavMessage;
29218    const ID: u32 = 126u32;
29219    const NAME: &'static str = "SERIAL_CONTROL";
29220    const EXTRA_CRC: u8 = 220u8;
29221    const ENCODED_LEN: usize = 81usize;
29222    fn deser(
29223        _version: MavlinkVersion,
29224        __input: &[u8],
29225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29226        let avail_len = __input.len();
29227        let mut payload_buf = [0; Self::ENCODED_LEN];
29228        let mut buf = if avail_len < Self::ENCODED_LEN {
29229            payload_buf[0..avail_len].copy_from_slice(__input);
29230            Bytes::new(&payload_buf)
29231        } else {
29232            Bytes::new(__input)
29233        };
29234        let mut __struct = Self::default();
29235        __struct.baudrate = buf.get_u32_le();
29236        __struct.timeout = buf.get_u16_le();
29237        let tmp = buf.get_u8();
29238        __struct.device =
29239            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29240                enum_type: "SerialControlDev",
29241                value: tmp as u64,
29242            })?;
29243        let tmp = buf.get_u8();
29244        __struct.flags = SerialControlFlag::from_bits(tmp).ok_or(
29245            ::mavlink_core::error::ParserError::InvalidFlag {
29246                flag_type: "SerialControlFlag",
29247                value: tmp as u64,
29248            },
29249        )?;
29250        __struct.count = buf.get_u8();
29251        for v in &mut __struct.data {
29252            let val = buf.get_u8();
29253            *v = val;
29254        }
29255        __struct.target_system = buf.get_u8();
29256        __struct.target_component = buf.get_u8();
29257        Ok(__struct)
29258    }
29259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29260        let mut __tmp = BytesMut::new(bytes);
29261        #[allow(clippy::absurd_extreme_comparisons)]
29262        #[allow(unused_comparisons)]
29263        if __tmp.remaining() < Self::ENCODED_LEN {
29264            panic!(
29265                "buffer is too small (need {} bytes, but got {})",
29266                Self::ENCODED_LEN,
29267                __tmp.remaining(),
29268            )
29269        }
29270        __tmp.put_u32_le(self.baudrate);
29271        __tmp.put_u16_le(self.timeout);
29272        __tmp.put_u8(self.device as u8);
29273        __tmp.put_u8(self.flags.bits());
29274        __tmp.put_u8(self.count);
29275        for val in &self.data {
29276            __tmp.put_u8(*val);
29277        }
29278        if matches!(version, MavlinkVersion::V2) {
29279            __tmp.put_u8(self.target_system);
29280            __tmp.put_u8(self.target_component);
29281            let len = __tmp.len();
29282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29283        } else {
29284            __tmp.len()
29285        }
29286    }
29287}
29288#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29289#[doc = ""]
29290#[doc = "ID: 36"]
29291#[derive(Debug, Clone, PartialEq)]
29292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29294#[cfg_attr(feature = "ts", derive(TS))]
29295#[cfg_attr(feature = "ts", ts(export))]
29296pub struct SERVO_OUTPUT_RAW_DATA {
29297    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29298    pub time_usec: u32,
29299    #[doc = "Servo output 1 value"]
29300    pub servo1_raw: u16,
29301    #[doc = "Servo output 2 value"]
29302    pub servo2_raw: u16,
29303    #[doc = "Servo output 3 value"]
29304    pub servo3_raw: u16,
29305    #[doc = "Servo output 4 value"]
29306    pub servo4_raw: u16,
29307    #[doc = "Servo output 5 value"]
29308    pub servo5_raw: u16,
29309    #[doc = "Servo output 6 value"]
29310    pub servo6_raw: u16,
29311    #[doc = "Servo output 7 value"]
29312    pub servo7_raw: u16,
29313    #[doc = "Servo output 8 value"]
29314    pub servo8_raw: u16,
29315    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29316    pub port: u8,
29317    #[doc = "Servo output 9 value"]
29318    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29319    pub servo9_raw: u16,
29320    #[doc = "Servo output 10 value"]
29321    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29322    pub servo10_raw: u16,
29323    #[doc = "Servo output 11 value"]
29324    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29325    pub servo11_raw: u16,
29326    #[doc = "Servo output 12 value"]
29327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29328    pub servo12_raw: u16,
29329    #[doc = "Servo output 13 value"]
29330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29331    pub servo13_raw: u16,
29332    #[doc = "Servo output 14 value"]
29333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29334    pub servo14_raw: u16,
29335    #[doc = "Servo output 15 value"]
29336    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29337    pub servo15_raw: u16,
29338    #[doc = "Servo output 16 value"]
29339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29340    pub servo16_raw: u16,
29341}
29342impl SERVO_OUTPUT_RAW_DATA {
29343    pub const ENCODED_LEN: usize = 37usize;
29344    pub const DEFAULT: Self = Self {
29345        time_usec: 0_u32,
29346        servo1_raw: 0_u16,
29347        servo2_raw: 0_u16,
29348        servo3_raw: 0_u16,
29349        servo4_raw: 0_u16,
29350        servo5_raw: 0_u16,
29351        servo6_raw: 0_u16,
29352        servo7_raw: 0_u16,
29353        servo8_raw: 0_u16,
29354        port: 0_u8,
29355        servo9_raw: 0_u16,
29356        servo10_raw: 0_u16,
29357        servo11_raw: 0_u16,
29358        servo12_raw: 0_u16,
29359        servo13_raw: 0_u16,
29360        servo14_raw: 0_u16,
29361        servo15_raw: 0_u16,
29362        servo16_raw: 0_u16,
29363    };
29364    #[cfg(feature = "arbitrary")]
29365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29366        use arbitrary::{Arbitrary, Unstructured};
29367        let mut buf = [0u8; 1024];
29368        rng.fill_bytes(&mut buf);
29369        let mut unstructured = Unstructured::new(&buf);
29370        Self::arbitrary(&mut unstructured).unwrap_or_default()
29371    }
29372}
29373impl Default for SERVO_OUTPUT_RAW_DATA {
29374    fn default() -> Self {
29375        Self::DEFAULT.clone()
29376    }
29377}
29378impl MessageData for SERVO_OUTPUT_RAW_DATA {
29379    type Message = MavMessage;
29380    const ID: u32 = 36u32;
29381    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29382    const EXTRA_CRC: u8 = 222u8;
29383    const ENCODED_LEN: usize = 37usize;
29384    fn deser(
29385        _version: MavlinkVersion,
29386        __input: &[u8],
29387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29388        let avail_len = __input.len();
29389        let mut payload_buf = [0; Self::ENCODED_LEN];
29390        let mut buf = if avail_len < Self::ENCODED_LEN {
29391            payload_buf[0..avail_len].copy_from_slice(__input);
29392            Bytes::new(&payload_buf)
29393        } else {
29394            Bytes::new(__input)
29395        };
29396        let mut __struct = Self::default();
29397        __struct.time_usec = buf.get_u32_le();
29398        __struct.servo1_raw = buf.get_u16_le();
29399        __struct.servo2_raw = buf.get_u16_le();
29400        __struct.servo3_raw = buf.get_u16_le();
29401        __struct.servo4_raw = buf.get_u16_le();
29402        __struct.servo5_raw = buf.get_u16_le();
29403        __struct.servo6_raw = buf.get_u16_le();
29404        __struct.servo7_raw = buf.get_u16_le();
29405        __struct.servo8_raw = buf.get_u16_le();
29406        __struct.port = buf.get_u8();
29407        __struct.servo9_raw = buf.get_u16_le();
29408        __struct.servo10_raw = buf.get_u16_le();
29409        __struct.servo11_raw = buf.get_u16_le();
29410        __struct.servo12_raw = buf.get_u16_le();
29411        __struct.servo13_raw = buf.get_u16_le();
29412        __struct.servo14_raw = buf.get_u16_le();
29413        __struct.servo15_raw = buf.get_u16_le();
29414        __struct.servo16_raw = buf.get_u16_le();
29415        Ok(__struct)
29416    }
29417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29418        let mut __tmp = BytesMut::new(bytes);
29419        #[allow(clippy::absurd_extreme_comparisons)]
29420        #[allow(unused_comparisons)]
29421        if __tmp.remaining() < Self::ENCODED_LEN {
29422            panic!(
29423                "buffer is too small (need {} bytes, but got {})",
29424                Self::ENCODED_LEN,
29425                __tmp.remaining(),
29426            )
29427        }
29428        __tmp.put_u32_le(self.time_usec);
29429        __tmp.put_u16_le(self.servo1_raw);
29430        __tmp.put_u16_le(self.servo2_raw);
29431        __tmp.put_u16_le(self.servo3_raw);
29432        __tmp.put_u16_le(self.servo4_raw);
29433        __tmp.put_u16_le(self.servo5_raw);
29434        __tmp.put_u16_le(self.servo6_raw);
29435        __tmp.put_u16_le(self.servo7_raw);
29436        __tmp.put_u16_le(self.servo8_raw);
29437        __tmp.put_u8(self.port);
29438        if matches!(version, MavlinkVersion::V2) {
29439            __tmp.put_u16_le(self.servo9_raw);
29440            __tmp.put_u16_le(self.servo10_raw);
29441            __tmp.put_u16_le(self.servo11_raw);
29442            __tmp.put_u16_le(self.servo12_raw);
29443            __tmp.put_u16_le(self.servo13_raw);
29444            __tmp.put_u16_le(self.servo14_raw);
29445            __tmp.put_u16_le(self.servo15_raw);
29446            __tmp.put_u16_le(self.servo16_raw);
29447            let len = __tmp.len();
29448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29449        } else {
29450            __tmp.len()
29451        }
29452    }
29453}
29454#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29455#[doc = ""]
29456#[doc = "ID: 256"]
29457#[derive(Debug, Clone, PartialEq)]
29458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29460#[cfg_attr(feature = "ts", derive(TS))]
29461#[cfg_attr(feature = "ts", ts(export))]
29462pub struct SETUP_SIGNING_DATA {
29463    #[doc = "initial timestamp"]
29464    pub initial_timestamp: u64,
29465    #[doc = "system id of the target"]
29466    pub target_system: u8,
29467    #[doc = "component ID of the target"]
29468    pub target_component: u8,
29469    #[doc = "signing key"]
29470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29472    pub secret_key: [u8; 32],
29473}
29474impl SETUP_SIGNING_DATA {
29475    pub const ENCODED_LEN: usize = 42usize;
29476    pub const DEFAULT: Self = Self {
29477        initial_timestamp: 0_u64,
29478        target_system: 0_u8,
29479        target_component: 0_u8,
29480        secret_key: [0_u8; 32usize],
29481    };
29482    #[cfg(feature = "arbitrary")]
29483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29484        use arbitrary::{Arbitrary, Unstructured};
29485        let mut buf = [0u8; 1024];
29486        rng.fill_bytes(&mut buf);
29487        let mut unstructured = Unstructured::new(&buf);
29488        Self::arbitrary(&mut unstructured).unwrap_or_default()
29489    }
29490}
29491impl Default for SETUP_SIGNING_DATA {
29492    fn default() -> Self {
29493        Self::DEFAULT.clone()
29494    }
29495}
29496impl MessageData for SETUP_SIGNING_DATA {
29497    type Message = MavMessage;
29498    const ID: u32 = 256u32;
29499    const NAME: &'static str = "SETUP_SIGNING";
29500    const EXTRA_CRC: u8 = 71u8;
29501    const ENCODED_LEN: usize = 42usize;
29502    fn deser(
29503        _version: MavlinkVersion,
29504        __input: &[u8],
29505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29506        let avail_len = __input.len();
29507        let mut payload_buf = [0; Self::ENCODED_LEN];
29508        let mut buf = if avail_len < Self::ENCODED_LEN {
29509            payload_buf[0..avail_len].copy_from_slice(__input);
29510            Bytes::new(&payload_buf)
29511        } else {
29512            Bytes::new(__input)
29513        };
29514        let mut __struct = Self::default();
29515        __struct.initial_timestamp = buf.get_u64_le();
29516        __struct.target_system = buf.get_u8();
29517        __struct.target_component = buf.get_u8();
29518        for v in &mut __struct.secret_key {
29519            let val = buf.get_u8();
29520            *v = val;
29521        }
29522        Ok(__struct)
29523    }
29524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29525        let mut __tmp = BytesMut::new(bytes);
29526        #[allow(clippy::absurd_extreme_comparisons)]
29527        #[allow(unused_comparisons)]
29528        if __tmp.remaining() < Self::ENCODED_LEN {
29529            panic!(
29530                "buffer is too small (need {} bytes, but got {})",
29531                Self::ENCODED_LEN,
29532                __tmp.remaining(),
29533            )
29534        }
29535        __tmp.put_u64_le(self.initial_timestamp);
29536        __tmp.put_u8(self.target_system);
29537        __tmp.put_u8(self.target_component);
29538        for val in &self.secret_key {
29539            __tmp.put_u8(*val);
29540        }
29541        if matches!(version, MavlinkVersion::V2) {
29542            let len = __tmp.len();
29543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29544        } else {
29545            __tmp.len()
29546        }
29547    }
29548}
29549#[doc = "Set the vehicle attitude and body angular rates."]
29550#[doc = ""]
29551#[doc = "ID: 139"]
29552#[derive(Debug, Clone, PartialEq)]
29553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29555#[cfg_attr(feature = "ts", derive(TS))]
29556#[cfg_attr(feature = "ts", ts(export))]
29557pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29558    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29559    pub time_usec: u64,
29560    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29561    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29562    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29563    pub controls: [f32; 8],
29564    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29565    pub group_mlx: u8,
29566    #[doc = "System ID"]
29567    pub target_system: u8,
29568    #[doc = "Component ID"]
29569    pub target_component: u8,
29570}
29571impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29572    pub const ENCODED_LEN: usize = 43usize;
29573    pub const DEFAULT: Self = Self {
29574        time_usec: 0_u64,
29575        controls: [0.0_f32; 8usize],
29576        group_mlx: 0_u8,
29577        target_system: 0_u8,
29578        target_component: 0_u8,
29579    };
29580    #[cfg(feature = "arbitrary")]
29581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29582        use arbitrary::{Arbitrary, Unstructured};
29583        let mut buf = [0u8; 1024];
29584        rng.fill_bytes(&mut buf);
29585        let mut unstructured = Unstructured::new(&buf);
29586        Self::arbitrary(&mut unstructured).unwrap_or_default()
29587    }
29588}
29589impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29590    fn default() -> Self {
29591        Self::DEFAULT.clone()
29592    }
29593}
29594impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29595    type Message = MavMessage;
29596    const ID: u32 = 139u32;
29597    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29598    const EXTRA_CRC: u8 = 168u8;
29599    const ENCODED_LEN: usize = 43usize;
29600    fn deser(
29601        _version: MavlinkVersion,
29602        __input: &[u8],
29603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29604        let avail_len = __input.len();
29605        let mut payload_buf = [0; Self::ENCODED_LEN];
29606        let mut buf = if avail_len < Self::ENCODED_LEN {
29607            payload_buf[0..avail_len].copy_from_slice(__input);
29608            Bytes::new(&payload_buf)
29609        } else {
29610            Bytes::new(__input)
29611        };
29612        let mut __struct = Self::default();
29613        __struct.time_usec = buf.get_u64_le();
29614        for v in &mut __struct.controls {
29615            let val = buf.get_f32_le();
29616            *v = val;
29617        }
29618        __struct.group_mlx = buf.get_u8();
29619        __struct.target_system = buf.get_u8();
29620        __struct.target_component = buf.get_u8();
29621        Ok(__struct)
29622    }
29623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29624        let mut __tmp = BytesMut::new(bytes);
29625        #[allow(clippy::absurd_extreme_comparisons)]
29626        #[allow(unused_comparisons)]
29627        if __tmp.remaining() < Self::ENCODED_LEN {
29628            panic!(
29629                "buffer is too small (need {} bytes, but got {})",
29630                Self::ENCODED_LEN,
29631                __tmp.remaining(),
29632            )
29633        }
29634        __tmp.put_u64_le(self.time_usec);
29635        for val in &self.controls {
29636            __tmp.put_f32_le(*val);
29637        }
29638        __tmp.put_u8(self.group_mlx);
29639        __tmp.put_u8(self.target_system);
29640        __tmp.put_u8(self.target_component);
29641        if matches!(version, MavlinkVersion::V2) {
29642            let len = __tmp.len();
29643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29644        } else {
29645            __tmp.len()
29646        }
29647    }
29648}
29649#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29650#[doc = ""]
29651#[doc = "ID: 82"]
29652#[derive(Debug, Clone, PartialEq)]
29653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29655#[cfg_attr(feature = "ts", derive(TS))]
29656#[cfg_attr(feature = "ts", ts(export))]
29657pub struct SET_ATTITUDE_TARGET_DATA {
29658    #[doc = "Timestamp (time since system boot)."]
29659    pub time_boot_ms: u32,
29660    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29661    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29662    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29663    pub q: [f32; 4],
29664    #[doc = "Body roll rate"]
29665    pub body_roll_rate: f32,
29666    #[doc = "Body pitch rate"]
29667    pub body_pitch_rate: f32,
29668    #[doc = "Body yaw rate"]
29669    pub body_yaw_rate: f32,
29670    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29671    pub thrust: f32,
29672    #[doc = "System ID"]
29673    pub target_system: u8,
29674    #[doc = "Component ID"]
29675    pub target_component: u8,
29676    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29677    pub type_mask: AttitudeTargetTypemask,
29678    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29682    pub thrust_body: [f32; 3],
29683}
29684impl SET_ATTITUDE_TARGET_DATA {
29685    pub const ENCODED_LEN: usize = 51usize;
29686    pub const DEFAULT: Self = Self {
29687        time_boot_ms: 0_u32,
29688        q: [0.0_f32; 4usize],
29689        body_roll_rate: 0.0_f32,
29690        body_pitch_rate: 0.0_f32,
29691        body_yaw_rate: 0.0_f32,
29692        thrust: 0.0_f32,
29693        target_system: 0_u8,
29694        target_component: 0_u8,
29695        type_mask: AttitudeTargetTypemask::DEFAULT,
29696        thrust_body: [0.0_f32; 3usize],
29697    };
29698    #[cfg(feature = "arbitrary")]
29699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29700        use arbitrary::{Arbitrary, Unstructured};
29701        let mut buf = [0u8; 1024];
29702        rng.fill_bytes(&mut buf);
29703        let mut unstructured = Unstructured::new(&buf);
29704        Self::arbitrary(&mut unstructured).unwrap_or_default()
29705    }
29706}
29707impl Default for SET_ATTITUDE_TARGET_DATA {
29708    fn default() -> Self {
29709        Self::DEFAULT.clone()
29710    }
29711}
29712impl MessageData for SET_ATTITUDE_TARGET_DATA {
29713    type Message = MavMessage;
29714    const ID: u32 = 82u32;
29715    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29716    const EXTRA_CRC: u8 = 49u8;
29717    const ENCODED_LEN: usize = 51usize;
29718    fn deser(
29719        _version: MavlinkVersion,
29720        __input: &[u8],
29721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29722        let avail_len = __input.len();
29723        let mut payload_buf = [0; Self::ENCODED_LEN];
29724        let mut buf = if avail_len < Self::ENCODED_LEN {
29725            payload_buf[0..avail_len].copy_from_slice(__input);
29726            Bytes::new(&payload_buf)
29727        } else {
29728            Bytes::new(__input)
29729        };
29730        let mut __struct = Self::default();
29731        __struct.time_boot_ms = buf.get_u32_le();
29732        for v in &mut __struct.q {
29733            let val = buf.get_f32_le();
29734            *v = val;
29735        }
29736        __struct.body_roll_rate = buf.get_f32_le();
29737        __struct.body_pitch_rate = buf.get_f32_le();
29738        __struct.body_yaw_rate = buf.get_f32_le();
29739        __struct.thrust = buf.get_f32_le();
29740        __struct.target_system = buf.get_u8();
29741        __struct.target_component = buf.get_u8();
29742        let tmp = buf.get_u8();
29743        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
29744            ::mavlink_core::error::ParserError::InvalidFlag {
29745                flag_type: "AttitudeTargetTypemask",
29746                value: tmp as u64,
29747            },
29748        )?;
29749        for v in &mut __struct.thrust_body {
29750            let val = buf.get_f32_le();
29751            *v = val;
29752        }
29753        Ok(__struct)
29754    }
29755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29756        let mut __tmp = BytesMut::new(bytes);
29757        #[allow(clippy::absurd_extreme_comparisons)]
29758        #[allow(unused_comparisons)]
29759        if __tmp.remaining() < Self::ENCODED_LEN {
29760            panic!(
29761                "buffer is too small (need {} bytes, but got {})",
29762                Self::ENCODED_LEN,
29763                __tmp.remaining(),
29764            )
29765        }
29766        __tmp.put_u32_le(self.time_boot_ms);
29767        for val in &self.q {
29768            __tmp.put_f32_le(*val);
29769        }
29770        __tmp.put_f32_le(self.body_roll_rate);
29771        __tmp.put_f32_le(self.body_pitch_rate);
29772        __tmp.put_f32_le(self.body_yaw_rate);
29773        __tmp.put_f32_le(self.thrust);
29774        __tmp.put_u8(self.target_system);
29775        __tmp.put_u8(self.target_component);
29776        __tmp.put_u8(self.type_mask.bits());
29777        if matches!(version, MavlinkVersion::V2) {
29778            for val in &self.thrust_body {
29779                __tmp.put_f32_le(*val);
29780            }
29781            let len = __tmp.len();
29782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29783        } else {
29784            __tmp.len()
29785        }
29786    }
29787}
29788#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29789#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29790#[doc = ""]
29791#[doc = "ID: 48"]
29792#[derive(Debug, Clone, PartialEq)]
29793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29795#[cfg_attr(feature = "ts", derive(TS))]
29796#[cfg_attr(feature = "ts", ts(export))]
29797pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29798    #[doc = "Latitude (WGS84)"]
29799    pub latitude: i32,
29800    #[doc = "Longitude (WGS84)"]
29801    pub longitude: i32,
29802    #[doc = "Altitude (MSL). Positive for up."]
29803    pub altitude: i32,
29804    #[doc = "System ID"]
29805    pub target_system: u8,
29806    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29808    pub time_usec: u64,
29809}
29810impl SET_GPS_GLOBAL_ORIGIN_DATA {
29811    pub const ENCODED_LEN: usize = 21usize;
29812    pub const DEFAULT: Self = Self {
29813        latitude: 0_i32,
29814        longitude: 0_i32,
29815        altitude: 0_i32,
29816        target_system: 0_u8,
29817        time_usec: 0_u64,
29818    };
29819    #[cfg(feature = "arbitrary")]
29820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29821        use arbitrary::{Arbitrary, Unstructured};
29822        let mut buf = [0u8; 1024];
29823        rng.fill_bytes(&mut buf);
29824        let mut unstructured = Unstructured::new(&buf);
29825        Self::arbitrary(&mut unstructured).unwrap_or_default()
29826    }
29827}
29828impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29829    fn default() -> Self {
29830        Self::DEFAULT.clone()
29831    }
29832}
29833impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29834    type Message = MavMessage;
29835    const ID: u32 = 48u32;
29836    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29837    const EXTRA_CRC: u8 = 41u8;
29838    const ENCODED_LEN: usize = 21usize;
29839    fn deser(
29840        _version: MavlinkVersion,
29841        __input: &[u8],
29842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29843        let avail_len = __input.len();
29844        let mut payload_buf = [0; Self::ENCODED_LEN];
29845        let mut buf = if avail_len < Self::ENCODED_LEN {
29846            payload_buf[0..avail_len].copy_from_slice(__input);
29847            Bytes::new(&payload_buf)
29848        } else {
29849            Bytes::new(__input)
29850        };
29851        let mut __struct = Self::default();
29852        __struct.latitude = buf.get_i32_le();
29853        __struct.longitude = buf.get_i32_le();
29854        __struct.altitude = buf.get_i32_le();
29855        __struct.target_system = buf.get_u8();
29856        __struct.time_usec = buf.get_u64_le();
29857        Ok(__struct)
29858    }
29859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29860        let mut __tmp = BytesMut::new(bytes);
29861        #[allow(clippy::absurd_extreme_comparisons)]
29862        #[allow(unused_comparisons)]
29863        if __tmp.remaining() < Self::ENCODED_LEN {
29864            panic!(
29865                "buffer is too small (need {} bytes, but got {})",
29866                Self::ENCODED_LEN,
29867                __tmp.remaining(),
29868            )
29869        }
29870        __tmp.put_i32_le(self.latitude);
29871        __tmp.put_i32_le(self.longitude);
29872        __tmp.put_i32_le(self.altitude);
29873        __tmp.put_u8(self.target_system);
29874        if matches!(version, MavlinkVersion::V2) {
29875            __tmp.put_u64_le(self.time_usec);
29876            let len = __tmp.len();
29877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29878        } else {
29879            __tmp.len()
29880        }
29881    }
29882}
29883#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29884#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29885#[doc = ""]
29886#[doc = "ID: 243"]
29887#[derive(Debug, Clone, PartialEq)]
29888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29890#[cfg_attr(feature = "ts", derive(TS))]
29891#[cfg_attr(feature = "ts", ts(export))]
29892pub struct SET_HOME_POSITION_DATA {
29893    #[doc = "Latitude (WGS84)"]
29894    pub latitude: i32,
29895    #[doc = "Longitude (WGS84)"]
29896    pub longitude: i32,
29897    #[doc = "Altitude (MSL). Positive for up."]
29898    pub altitude: i32,
29899    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29900    pub x: f32,
29901    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29902    pub y: f32,
29903    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29904    pub z: f32,
29905    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29907    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29908    pub q: [f32; 4],
29909    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29910    pub approach_x: f32,
29911    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29912    pub approach_y: f32,
29913    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29914    pub approach_z: f32,
29915    #[doc = "System ID."]
29916    pub target_system: u8,
29917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29919    pub time_usec: u64,
29920}
29921impl SET_HOME_POSITION_DATA {
29922    pub const ENCODED_LEN: usize = 61usize;
29923    pub const DEFAULT: Self = Self {
29924        latitude: 0_i32,
29925        longitude: 0_i32,
29926        altitude: 0_i32,
29927        x: 0.0_f32,
29928        y: 0.0_f32,
29929        z: 0.0_f32,
29930        q: [0.0_f32; 4usize],
29931        approach_x: 0.0_f32,
29932        approach_y: 0.0_f32,
29933        approach_z: 0.0_f32,
29934        target_system: 0_u8,
29935        time_usec: 0_u64,
29936    };
29937    #[cfg(feature = "arbitrary")]
29938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29939        use arbitrary::{Arbitrary, Unstructured};
29940        let mut buf = [0u8; 1024];
29941        rng.fill_bytes(&mut buf);
29942        let mut unstructured = Unstructured::new(&buf);
29943        Self::arbitrary(&mut unstructured).unwrap_or_default()
29944    }
29945}
29946impl Default for SET_HOME_POSITION_DATA {
29947    fn default() -> Self {
29948        Self::DEFAULT.clone()
29949    }
29950}
29951impl MessageData for SET_HOME_POSITION_DATA {
29952    type Message = MavMessage;
29953    const ID: u32 = 243u32;
29954    const NAME: &'static str = "SET_HOME_POSITION";
29955    const EXTRA_CRC: u8 = 85u8;
29956    const ENCODED_LEN: usize = 61usize;
29957    fn deser(
29958        _version: MavlinkVersion,
29959        __input: &[u8],
29960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29961        let avail_len = __input.len();
29962        let mut payload_buf = [0; Self::ENCODED_LEN];
29963        let mut buf = if avail_len < Self::ENCODED_LEN {
29964            payload_buf[0..avail_len].copy_from_slice(__input);
29965            Bytes::new(&payload_buf)
29966        } else {
29967            Bytes::new(__input)
29968        };
29969        let mut __struct = Self::default();
29970        __struct.latitude = buf.get_i32_le();
29971        __struct.longitude = buf.get_i32_le();
29972        __struct.altitude = buf.get_i32_le();
29973        __struct.x = buf.get_f32_le();
29974        __struct.y = buf.get_f32_le();
29975        __struct.z = buf.get_f32_le();
29976        for v in &mut __struct.q {
29977            let val = buf.get_f32_le();
29978            *v = val;
29979        }
29980        __struct.approach_x = buf.get_f32_le();
29981        __struct.approach_y = buf.get_f32_le();
29982        __struct.approach_z = buf.get_f32_le();
29983        __struct.target_system = buf.get_u8();
29984        __struct.time_usec = buf.get_u64_le();
29985        Ok(__struct)
29986    }
29987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29988        let mut __tmp = BytesMut::new(bytes);
29989        #[allow(clippy::absurd_extreme_comparisons)]
29990        #[allow(unused_comparisons)]
29991        if __tmp.remaining() < Self::ENCODED_LEN {
29992            panic!(
29993                "buffer is too small (need {} bytes, but got {})",
29994                Self::ENCODED_LEN,
29995                __tmp.remaining(),
29996            )
29997        }
29998        __tmp.put_i32_le(self.latitude);
29999        __tmp.put_i32_le(self.longitude);
30000        __tmp.put_i32_le(self.altitude);
30001        __tmp.put_f32_le(self.x);
30002        __tmp.put_f32_le(self.y);
30003        __tmp.put_f32_le(self.z);
30004        for val in &self.q {
30005            __tmp.put_f32_le(*val);
30006        }
30007        __tmp.put_f32_le(self.approach_x);
30008        __tmp.put_f32_le(self.approach_y);
30009        __tmp.put_f32_le(self.approach_z);
30010        __tmp.put_u8(self.target_system);
30011        if matches!(version, MavlinkVersion::V2) {
30012            __tmp.put_u64_le(self.time_usec);
30013            let len = __tmp.len();
30014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30015        } else {
30016            __tmp.len()
30017        }
30018    }
30019}
30020#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30021#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30022#[doc = ""]
30023#[doc = "ID: 11"]
30024#[derive(Debug, Clone, PartialEq)]
30025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30027#[cfg_attr(feature = "ts", derive(TS))]
30028#[cfg_attr(feature = "ts", ts(export))]
30029pub struct SET_MODE_DATA {
30030    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30031    pub custom_mode: u32,
30032    #[doc = "The system setting the mode"]
30033    pub target_system: u8,
30034    #[doc = "The new base mode."]
30035    pub base_mode: MavMode,
30036}
30037impl SET_MODE_DATA {
30038    pub const ENCODED_LEN: usize = 6usize;
30039    pub const DEFAULT: Self = Self {
30040        custom_mode: 0_u32,
30041        target_system: 0_u8,
30042        base_mode: MavMode::DEFAULT,
30043    };
30044    #[cfg(feature = "arbitrary")]
30045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30046        use arbitrary::{Arbitrary, Unstructured};
30047        let mut buf = [0u8; 1024];
30048        rng.fill_bytes(&mut buf);
30049        let mut unstructured = Unstructured::new(&buf);
30050        Self::arbitrary(&mut unstructured).unwrap_or_default()
30051    }
30052}
30053impl Default for SET_MODE_DATA {
30054    fn default() -> Self {
30055        Self::DEFAULT.clone()
30056    }
30057}
30058impl MessageData for SET_MODE_DATA {
30059    type Message = MavMessage;
30060    const ID: u32 = 11u32;
30061    const NAME: &'static str = "SET_MODE";
30062    const EXTRA_CRC: u8 = 89u8;
30063    const ENCODED_LEN: usize = 6usize;
30064    fn deser(
30065        _version: MavlinkVersion,
30066        __input: &[u8],
30067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30068        let avail_len = __input.len();
30069        let mut payload_buf = [0; Self::ENCODED_LEN];
30070        let mut buf = if avail_len < Self::ENCODED_LEN {
30071            payload_buf[0..avail_len].copy_from_slice(__input);
30072            Bytes::new(&payload_buf)
30073        } else {
30074            Bytes::new(__input)
30075        };
30076        let mut __struct = Self::default();
30077        __struct.custom_mode = buf.get_u32_le();
30078        __struct.target_system = buf.get_u8();
30079        let tmp = buf.get_u8();
30080        __struct.base_mode =
30081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30082                enum_type: "MavMode",
30083                value: tmp as u64,
30084            })?;
30085        Ok(__struct)
30086    }
30087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30088        let mut __tmp = BytesMut::new(bytes);
30089        #[allow(clippy::absurd_extreme_comparisons)]
30090        #[allow(unused_comparisons)]
30091        if __tmp.remaining() < Self::ENCODED_LEN {
30092            panic!(
30093                "buffer is too small (need {} bytes, but got {})",
30094                Self::ENCODED_LEN,
30095                __tmp.remaining(),
30096            )
30097        }
30098        __tmp.put_u32_le(self.custom_mode);
30099        __tmp.put_u8(self.target_system);
30100        __tmp.put_u8(self.base_mode as u8);
30101        if matches!(version, MavlinkVersion::V2) {
30102            let len = __tmp.len();
30103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30104        } else {
30105            __tmp.len()
30106        }
30107    }
30108}
30109#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30110#[doc = ""]
30111#[doc = "ID: 86"]
30112#[derive(Debug, Clone, PartialEq)]
30113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30115#[cfg_attr(feature = "ts", derive(TS))]
30116#[cfg_attr(feature = "ts", ts(export))]
30117pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30118    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30119    pub time_boot_ms: u32,
30120    #[doc = "Latitude in WGS84 frame"]
30121    pub lat_int: i32,
30122    #[doc = "Longitude in WGS84 frame"]
30123    pub lon_int: i32,
30124    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30125    pub alt: f32,
30126    #[doc = "X velocity in NED frame"]
30127    pub vx: f32,
30128    #[doc = "Y velocity in NED frame"]
30129    pub vy: f32,
30130    #[doc = "Z velocity in NED frame"]
30131    pub vz: f32,
30132    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30133    pub afx: f32,
30134    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30135    pub afy: f32,
30136    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30137    pub afz: f32,
30138    #[doc = "yaw setpoint"]
30139    pub yaw: f32,
30140    #[doc = "yaw rate setpoint"]
30141    pub yaw_rate: f32,
30142    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30143    pub type_mask: PositionTargetTypemask,
30144    #[doc = "System ID"]
30145    pub target_system: u8,
30146    #[doc = "Component ID"]
30147    pub target_component: u8,
30148    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30149    pub coordinate_frame: MavFrame,
30150}
30151impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30152    pub const ENCODED_LEN: usize = 53usize;
30153    pub const DEFAULT: Self = Self {
30154        time_boot_ms: 0_u32,
30155        lat_int: 0_i32,
30156        lon_int: 0_i32,
30157        alt: 0.0_f32,
30158        vx: 0.0_f32,
30159        vy: 0.0_f32,
30160        vz: 0.0_f32,
30161        afx: 0.0_f32,
30162        afy: 0.0_f32,
30163        afz: 0.0_f32,
30164        yaw: 0.0_f32,
30165        yaw_rate: 0.0_f32,
30166        type_mask: PositionTargetTypemask::DEFAULT,
30167        target_system: 0_u8,
30168        target_component: 0_u8,
30169        coordinate_frame: MavFrame::DEFAULT,
30170    };
30171    #[cfg(feature = "arbitrary")]
30172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30173        use arbitrary::{Arbitrary, Unstructured};
30174        let mut buf = [0u8; 1024];
30175        rng.fill_bytes(&mut buf);
30176        let mut unstructured = Unstructured::new(&buf);
30177        Self::arbitrary(&mut unstructured).unwrap_or_default()
30178    }
30179}
30180impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30181    fn default() -> Self {
30182        Self::DEFAULT.clone()
30183    }
30184}
30185impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30186    type Message = MavMessage;
30187    const ID: u32 = 86u32;
30188    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30189    const EXTRA_CRC: u8 = 5u8;
30190    const ENCODED_LEN: usize = 53usize;
30191    fn deser(
30192        _version: MavlinkVersion,
30193        __input: &[u8],
30194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30195        let avail_len = __input.len();
30196        let mut payload_buf = [0; Self::ENCODED_LEN];
30197        let mut buf = if avail_len < Self::ENCODED_LEN {
30198            payload_buf[0..avail_len].copy_from_slice(__input);
30199            Bytes::new(&payload_buf)
30200        } else {
30201            Bytes::new(__input)
30202        };
30203        let mut __struct = Self::default();
30204        __struct.time_boot_ms = buf.get_u32_le();
30205        __struct.lat_int = buf.get_i32_le();
30206        __struct.lon_int = buf.get_i32_le();
30207        __struct.alt = buf.get_f32_le();
30208        __struct.vx = buf.get_f32_le();
30209        __struct.vy = buf.get_f32_le();
30210        __struct.vz = buf.get_f32_le();
30211        __struct.afx = buf.get_f32_le();
30212        __struct.afy = buf.get_f32_le();
30213        __struct.afz = buf.get_f32_le();
30214        __struct.yaw = buf.get_f32_le();
30215        __struct.yaw_rate = buf.get_f32_le();
30216        let tmp = buf.get_u16_le();
30217        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
30218            ::mavlink_core::error::ParserError::InvalidFlag {
30219                flag_type: "PositionTargetTypemask",
30220                value: tmp as u64,
30221            },
30222        )?;
30223        __struct.target_system = buf.get_u8();
30224        __struct.target_component = buf.get_u8();
30225        let tmp = buf.get_u8();
30226        __struct.coordinate_frame =
30227            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30228                enum_type: "MavFrame",
30229                value: tmp as u64,
30230            })?;
30231        Ok(__struct)
30232    }
30233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30234        let mut __tmp = BytesMut::new(bytes);
30235        #[allow(clippy::absurd_extreme_comparisons)]
30236        #[allow(unused_comparisons)]
30237        if __tmp.remaining() < Self::ENCODED_LEN {
30238            panic!(
30239                "buffer is too small (need {} bytes, but got {})",
30240                Self::ENCODED_LEN,
30241                __tmp.remaining(),
30242            )
30243        }
30244        __tmp.put_u32_le(self.time_boot_ms);
30245        __tmp.put_i32_le(self.lat_int);
30246        __tmp.put_i32_le(self.lon_int);
30247        __tmp.put_f32_le(self.alt);
30248        __tmp.put_f32_le(self.vx);
30249        __tmp.put_f32_le(self.vy);
30250        __tmp.put_f32_le(self.vz);
30251        __tmp.put_f32_le(self.afx);
30252        __tmp.put_f32_le(self.afy);
30253        __tmp.put_f32_le(self.afz);
30254        __tmp.put_f32_le(self.yaw);
30255        __tmp.put_f32_le(self.yaw_rate);
30256        __tmp.put_u16_le(self.type_mask.bits());
30257        __tmp.put_u8(self.target_system);
30258        __tmp.put_u8(self.target_component);
30259        __tmp.put_u8(self.coordinate_frame as u8);
30260        if matches!(version, MavlinkVersion::V2) {
30261            let len = __tmp.len();
30262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30263        } else {
30264            __tmp.len()
30265        }
30266    }
30267}
30268#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30269#[doc = ""]
30270#[doc = "ID: 84"]
30271#[derive(Debug, Clone, PartialEq)]
30272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30274#[cfg_attr(feature = "ts", derive(TS))]
30275#[cfg_attr(feature = "ts", ts(export))]
30276pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30277    #[doc = "Timestamp (time since system boot)."]
30278    pub time_boot_ms: u32,
30279    #[doc = "X Position in NED frame"]
30280    pub x: f32,
30281    #[doc = "Y Position in NED frame"]
30282    pub y: f32,
30283    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30284    pub z: f32,
30285    #[doc = "X velocity in NED frame"]
30286    pub vx: f32,
30287    #[doc = "Y velocity in NED frame"]
30288    pub vy: f32,
30289    #[doc = "Z velocity in NED frame"]
30290    pub vz: f32,
30291    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30292    pub afx: f32,
30293    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30294    pub afy: f32,
30295    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30296    pub afz: f32,
30297    #[doc = "yaw setpoint"]
30298    pub yaw: f32,
30299    #[doc = "yaw rate setpoint"]
30300    pub yaw_rate: f32,
30301    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30302    pub type_mask: PositionTargetTypemask,
30303    #[doc = "System ID"]
30304    pub target_system: u8,
30305    #[doc = "Component ID"]
30306    pub target_component: u8,
30307    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30308    pub coordinate_frame: MavFrame,
30309}
30310impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30311    pub const ENCODED_LEN: usize = 53usize;
30312    pub const DEFAULT: Self = Self {
30313        time_boot_ms: 0_u32,
30314        x: 0.0_f32,
30315        y: 0.0_f32,
30316        z: 0.0_f32,
30317        vx: 0.0_f32,
30318        vy: 0.0_f32,
30319        vz: 0.0_f32,
30320        afx: 0.0_f32,
30321        afy: 0.0_f32,
30322        afz: 0.0_f32,
30323        yaw: 0.0_f32,
30324        yaw_rate: 0.0_f32,
30325        type_mask: PositionTargetTypemask::DEFAULT,
30326        target_system: 0_u8,
30327        target_component: 0_u8,
30328        coordinate_frame: MavFrame::DEFAULT,
30329    };
30330    #[cfg(feature = "arbitrary")]
30331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30332        use arbitrary::{Arbitrary, Unstructured};
30333        let mut buf = [0u8; 1024];
30334        rng.fill_bytes(&mut buf);
30335        let mut unstructured = Unstructured::new(&buf);
30336        Self::arbitrary(&mut unstructured).unwrap_or_default()
30337    }
30338}
30339impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30340    fn default() -> Self {
30341        Self::DEFAULT.clone()
30342    }
30343}
30344impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30345    type Message = MavMessage;
30346    const ID: u32 = 84u32;
30347    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30348    const EXTRA_CRC: u8 = 143u8;
30349    const ENCODED_LEN: usize = 53usize;
30350    fn deser(
30351        _version: MavlinkVersion,
30352        __input: &[u8],
30353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30354        let avail_len = __input.len();
30355        let mut payload_buf = [0; Self::ENCODED_LEN];
30356        let mut buf = if avail_len < Self::ENCODED_LEN {
30357            payload_buf[0..avail_len].copy_from_slice(__input);
30358            Bytes::new(&payload_buf)
30359        } else {
30360            Bytes::new(__input)
30361        };
30362        let mut __struct = Self::default();
30363        __struct.time_boot_ms = buf.get_u32_le();
30364        __struct.x = buf.get_f32_le();
30365        __struct.y = buf.get_f32_le();
30366        __struct.z = buf.get_f32_le();
30367        __struct.vx = buf.get_f32_le();
30368        __struct.vy = buf.get_f32_le();
30369        __struct.vz = buf.get_f32_le();
30370        __struct.afx = buf.get_f32_le();
30371        __struct.afy = buf.get_f32_le();
30372        __struct.afz = buf.get_f32_le();
30373        __struct.yaw = buf.get_f32_le();
30374        __struct.yaw_rate = buf.get_f32_le();
30375        let tmp = buf.get_u16_le();
30376        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
30377            ::mavlink_core::error::ParserError::InvalidFlag {
30378                flag_type: "PositionTargetTypemask",
30379                value: tmp as u64,
30380            },
30381        )?;
30382        __struct.target_system = buf.get_u8();
30383        __struct.target_component = buf.get_u8();
30384        let tmp = buf.get_u8();
30385        __struct.coordinate_frame =
30386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30387                enum_type: "MavFrame",
30388                value: tmp as u64,
30389            })?;
30390        Ok(__struct)
30391    }
30392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30393        let mut __tmp = BytesMut::new(bytes);
30394        #[allow(clippy::absurd_extreme_comparisons)]
30395        #[allow(unused_comparisons)]
30396        if __tmp.remaining() < Self::ENCODED_LEN {
30397            panic!(
30398                "buffer is too small (need {} bytes, but got {})",
30399                Self::ENCODED_LEN,
30400                __tmp.remaining(),
30401            )
30402        }
30403        __tmp.put_u32_le(self.time_boot_ms);
30404        __tmp.put_f32_le(self.x);
30405        __tmp.put_f32_le(self.y);
30406        __tmp.put_f32_le(self.z);
30407        __tmp.put_f32_le(self.vx);
30408        __tmp.put_f32_le(self.vy);
30409        __tmp.put_f32_le(self.vz);
30410        __tmp.put_f32_le(self.afx);
30411        __tmp.put_f32_le(self.afy);
30412        __tmp.put_f32_le(self.afz);
30413        __tmp.put_f32_le(self.yaw);
30414        __tmp.put_f32_le(self.yaw_rate);
30415        __tmp.put_u16_le(self.type_mask.bits());
30416        __tmp.put_u8(self.target_system);
30417        __tmp.put_u8(self.target_component);
30418        __tmp.put_u8(self.coordinate_frame as u8);
30419        if matches!(version, MavlinkVersion::V2) {
30420            let len = __tmp.len();
30421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30422        } else {
30423            __tmp.len()
30424        }
30425    }
30426}
30427#[doc = "Status of simulation environment, if used."]
30428#[doc = ""]
30429#[doc = "ID: 108"]
30430#[derive(Debug, Clone, PartialEq)]
30431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30433#[cfg_attr(feature = "ts", derive(TS))]
30434#[cfg_attr(feature = "ts", ts(export))]
30435pub struct SIM_STATE_DATA {
30436    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30437    pub q1: f32,
30438    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30439    pub q2: f32,
30440    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30441    pub q3: f32,
30442    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30443    pub q4: f32,
30444    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30445    pub roll: f32,
30446    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30447    pub pitch: f32,
30448    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30449    pub yaw: f32,
30450    #[doc = "X acceleration"]
30451    pub xacc: f32,
30452    #[doc = "Y acceleration"]
30453    pub yacc: f32,
30454    #[doc = "Z acceleration"]
30455    pub zacc: f32,
30456    #[doc = "Angular speed around X axis"]
30457    pub xgyro: f32,
30458    #[doc = "Angular speed around Y axis"]
30459    pub ygyro: f32,
30460    #[doc = "Angular speed around Z axis"]
30461    pub zgyro: f32,
30462    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30463    pub lat: f32,
30464    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30465    pub lon: f32,
30466    #[doc = "Altitude"]
30467    pub alt: f32,
30468    #[doc = "Horizontal position standard deviation"]
30469    pub std_dev_horz: f32,
30470    #[doc = "Vertical position standard deviation"]
30471    pub std_dev_vert: f32,
30472    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30473    pub vn: f32,
30474    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30475    pub ve: f32,
30476    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30477    pub vd: f32,
30478    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30479    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30480    pub lat_int: i32,
30481    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30482    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30483    pub lon_int: i32,
30484}
30485impl SIM_STATE_DATA {
30486    pub const ENCODED_LEN: usize = 92usize;
30487    pub const DEFAULT: Self = Self {
30488        q1: 0.0_f32,
30489        q2: 0.0_f32,
30490        q3: 0.0_f32,
30491        q4: 0.0_f32,
30492        roll: 0.0_f32,
30493        pitch: 0.0_f32,
30494        yaw: 0.0_f32,
30495        xacc: 0.0_f32,
30496        yacc: 0.0_f32,
30497        zacc: 0.0_f32,
30498        xgyro: 0.0_f32,
30499        ygyro: 0.0_f32,
30500        zgyro: 0.0_f32,
30501        lat: 0.0_f32,
30502        lon: 0.0_f32,
30503        alt: 0.0_f32,
30504        std_dev_horz: 0.0_f32,
30505        std_dev_vert: 0.0_f32,
30506        vn: 0.0_f32,
30507        ve: 0.0_f32,
30508        vd: 0.0_f32,
30509        lat_int: 0_i32,
30510        lon_int: 0_i32,
30511    };
30512    #[cfg(feature = "arbitrary")]
30513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30514        use arbitrary::{Arbitrary, Unstructured};
30515        let mut buf = [0u8; 1024];
30516        rng.fill_bytes(&mut buf);
30517        let mut unstructured = Unstructured::new(&buf);
30518        Self::arbitrary(&mut unstructured).unwrap_or_default()
30519    }
30520}
30521impl Default for SIM_STATE_DATA {
30522    fn default() -> Self {
30523        Self::DEFAULT.clone()
30524    }
30525}
30526impl MessageData for SIM_STATE_DATA {
30527    type Message = MavMessage;
30528    const ID: u32 = 108u32;
30529    const NAME: &'static str = "SIM_STATE";
30530    const EXTRA_CRC: u8 = 32u8;
30531    const ENCODED_LEN: usize = 92usize;
30532    fn deser(
30533        _version: MavlinkVersion,
30534        __input: &[u8],
30535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30536        let avail_len = __input.len();
30537        let mut payload_buf = [0; Self::ENCODED_LEN];
30538        let mut buf = if avail_len < Self::ENCODED_LEN {
30539            payload_buf[0..avail_len].copy_from_slice(__input);
30540            Bytes::new(&payload_buf)
30541        } else {
30542            Bytes::new(__input)
30543        };
30544        let mut __struct = Self::default();
30545        __struct.q1 = buf.get_f32_le();
30546        __struct.q2 = buf.get_f32_le();
30547        __struct.q3 = buf.get_f32_le();
30548        __struct.q4 = buf.get_f32_le();
30549        __struct.roll = buf.get_f32_le();
30550        __struct.pitch = buf.get_f32_le();
30551        __struct.yaw = buf.get_f32_le();
30552        __struct.xacc = buf.get_f32_le();
30553        __struct.yacc = buf.get_f32_le();
30554        __struct.zacc = buf.get_f32_le();
30555        __struct.xgyro = buf.get_f32_le();
30556        __struct.ygyro = buf.get_f32_le();
30557        __struct.zgyro = buf.get_f32_le();
30558        __struct.lat = buf.get_f32_le();
30559        __struct.lon = buf.get_f32_le();
30560        __struct.alt = buf.get_f32_le();
30561        __struct.std_dev_horz = buf.get_f32_le();
30562        __struct.std_dev_vert = buf.get_f32_le();
30563        __struct.vn = buf.get_f32_le();
30564        __struct.ve = buf.get_f32_le();
30565        __struct.vd = buf.get_f32_le();
30566        __struct.lat_int = buf.get_i32_le();
30567        __struct.lon_int = buf.get_i32_le();
30568        Ok(__struct)
30569    }
30570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30571        let mut __tmp = BytesMut::new(bytes);
30572        #[allow(clippy::absurd_extreme_comparisons)]
30573        #[allow(unused_comparisons)]
30574        if __tmp.remaining() < Self::ENCODED_LEN {
30575            panic!(
30576                "buffer is too small (need {} bytes, but got {})",
30577                Self::ENCODED_LEN,
30578                __tmp.remaining(),
30579            )
30580        }
30581        __tmp.put_f32_le(self.q1);
30582        __tmp.put_f32_le(self.q2);
30583        __tmp.put_f32_le(self.q3);
30584        __tmp.put_f32_le(self.q4);
30585        __tmp.put_f32_le(self.roll);
30586        __tmp.put_f32_le(self.pitch);
30587        __tmp.put_f32_le(self.yaw);
30588        __tmp.put_f32_le(self.xacc);
30589        __tmp.put_f32_le(self.yacc);
30590        __tmp.put_f32_le(self.zacc);
30591        __tmp.put_f32_le(self.xgyro);
30592        __tmp.put_f32_le(self.ygyro);
30593        __tmp.put_f32_le(self.zgyro);
30594        __tmp.put_f32_le(self.lat);
30595        __tmp.put_f32_le(self.lon);
30596        __tmp.put_f32_le(self.alt);
30597        __tmp.put_f32_le(self.std_dev_horz);
30598        __tmp.put_f32_le(self.std_dev_vert);
30599        __tmp.put_f32_le(self.vn);
30600        __tmp.put_f32_le(self.ve);
30601        __tmp.put_f32_le(self.vd);
30602        if matches!(version, MavlinkVersion::V2) {
30603            __tmp.put_i32_le(self.lat_int);
30604            __tmp.put_i32_le(self.lon_int);
30605            let len = __tmp.len();
30606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30607        } else {
30608            __tmp.len()
30609        }
30610    }
30611}
30612#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30613#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30614#[doc = ""]
30615#[doc = "ID: 370"]
30616#[derive(Debug, Clone, PartialEq)]
30617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30619#[cfg_attr(feature = "ts", derive(TS))]
30620#[cfg_attr(feature = "ts", ts(export))]
30621pub struct SMART_BATTERY_INFO_DATA {
30622    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30623    pub capacity_full_specification: i32,
30624    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30625    pub capacity_full: i32,
30626    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30627    pub cycle_count: u16,
30628    #[doc = "Battery weight. 0: field not provided."]
30629    pub weight: u16,
30630    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30631    pub discharge_minimum_voltage: u16,
30632    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30633    pub charging_minimum_voltage: u16,
30634    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30635    pub resting_minimum_voltage: u16,
30636    #[doc = "Battery ID"]
30637    pub id: u8,
30638    #[doc = "Function of the battery"]
30639    pub battery_function: MavBatteryFunction,
30640    #[doc = "Type (chemistry) of the battery"]
30641    pub mavtype: MavBatteryType,
30642    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30643    #[cfg_attr(feature = "ts", ts(type = "string"))]
30644    pub serial_number: CharArray<16>,
30645    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30646    #[cfg_attr(feature = "ts", ts(type = "string"))]
30647    pub device_name: CharArray<50>,
30648    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30650    pub charging_maximum_voltage: u16,
30651    #[doc = "Number of battery cells in series. 0: field not provided."]
30652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30653    pub cells_in_series: u8,
30654    #[doc = "Maximum pack discharge current. 0: field not provided."]
30655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30656    pub discharge_maximum_current: u32,
30657    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30659    pub discharge_maximum_burst_current: u32,
30660    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30661    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30662    #[cfg_attr(feature = "ts", ts(type = "string"))]
30663    pub manufacture_date: CharArray<11>,
30664}
30665impl SMART_BATTERY_INFO_DATA {
30666    pub const ENCODED_LEN: usize = 109usize;
30667    pub const DEFAULT: Self = Self {
30668        capacity_full_specification: 0_i32,
30669        capacity_full: 0_i32,
30670        cycle_count: 0_u16,
30671        weight: 0_u16,
30672        discharge_minimum_voltage: 0_u16,
30673        charging_minimum_voltage: 0_u16,
30674        resting_minimum_voltage: 0_u16,
30675        id: 0_u8,
30676        battery_function: MavBatteryFunction::DEFAULT,
30677        mavtype: MavBatteryType::DEFAULT,
30678        serial_number: CharArray::new([0_u8; 16usize]),
30679        device_name: CharArray::new([0_u8; 50usize]),
30680        charging_maximum_voltage: 0_u16,
30681        cells_in_series: 0_u8,
30682        discharge_maximum_current: 0_u32,
30683        discharge_maximum_burst_current: 0_u32,
30684        manufacture_date: CharArray::new([0_u8; 11usize]),
30685    };
30686    #[cfg(feature = "arbitrary")]
30687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30688        use arbitrary::{Arbitrary, Unstructured};
30689        let mut buf = [0u8; 1024];
30690        rng.fill_bytes(&mut buf);
30691        let mut unstructured = Unstructured::new(&buf);
30692        Self::arbitrary(&mut unstructured).unwrap_or_default()
30693    }
30694}
30695impl Default for SMART_BATTERY_INFO_DATA {
30696    fn default() -> Self {
30697        Self::DEFAULT.clone()
30698    }
30699}
30700impl MessageData for SMART_BATTERY_INFO_DATA {
30701    type Message = MavMessage;
30702    const ID: u32 = 370u32;
30703    const NAME: &'static str = "SMART_BATTERY_INFO";
30704    const EXTRA_CRC: u8 = 75u8;
30705    const ENCODED_LEN: usize = 109usize;
30706    fn deser(
30707        _version: MavlinkVersion,
30708        __input: &[u8],
30709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30710        let avail_len = __input.len();
30711        let mut payload_buf = [0; Self::ENCODED_LEN];
30712        let mut buf = if avail_len < Self::ENCODED_LEN {
30713            payload_buf[0..avail_len].copy_from_slice(__input);
30714            Bytes::new(&payload_buf)
30715        } else {
30716            Bytes::new(__input)
30717        };
30718        let mut __struct = Self::default();
30719        __struct.capacity_full_specification = buf.get_i32_le();
30720        __struct.capacity_full = buf.get_i32_le();
30721        __struct.cycle_count = buf.get_u16_le();
30722        __struct.weight = buf.get_u16_le();
30723        __struct.discharge_minimum_voltage = buf.get_u16_le();
30724        __struct.charging_minimum_voltage = buf.get_u16_le();
30725        __struct.resting_minimum_voltage = buf.get_u16_le();
30726        __struct.id = buf.get_u8();
30727        let tmp = buf.get_u8();
30728        __struct.battery_function =
30729            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30730                enum_type: "MavBatteryFunction",
30731                value: tmp as u64,
30732            })?;
30733        let tmp = buf.get_u8();
30734        __struct.mavtype =
30735            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30736                enum_type: "MavBatteryType",
30737                value: tmp as u64,
30738            })?;
30739        let mut tmp = [0_u8; 16usize];
30740        for v in &mut tmp {
30741            *v = buf.get_u8();
30742        }
30743        __struct.serial_number = CharArray::new(tmp);
30744        let mut tmp = [0_u8; 50usize];
30745        for v in &mut tmp {
30746            *v = buf.get_u8();
30747        }
30748        __struct.device_name = CharArray::new(tmp);
30749        __struct.charging_maximum_voltage = buf.get_u16_le();
30750        __struct.cells_in_series = buf.get_u8();
30751        __struct.discharge_maximum_current = buf.get_u32_le();
30752        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30753        let mut tmp = [0_u8; 11usize];
30754        for v in &mut tmp {
30755            *v = buf.get_u8();
30756        }
30757        __struct.manufacture_date = CharArray::new(tmp);
30758        Ok(__struct)
30759    }
30760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30761        let mut __tmp = BytesMut::new(bytes);
30762        #[allow(clippy::absurd_extreme_comparisons)]
30763        #[allow(unused_comparisons)]
30764        if __tmp.remaining() < Self::ENCODED_LEN {
30765            panic!(
30766                "buffer is too small (need {} bytes, but got {})",
30767                Self::ENCODED_LEN,
30768                __tmp.remaining(),
30769            )
30770        }
30771        __tmp.put_i32_le(self.capacity_full_specification);
30772        __tmp.put_i32_le(self.capacity_full);
30773        __tmp.put_u16_le(self.cycle_count);
30774        __tmp.put_u16_le(self.weight);
30775        __tmp.put_u16_le(self.discharge_minimum_voltage);
30776        __tmp.put_u16_le(self.charging_minimum_voltage);
30777        __tmp.put_u16_le(self.resting_minimum_voltage);
30778        __tmp.put_u8(self.id);
30779        __tmp.put_u8(self.battery_function as u8);
30780        __tmp.put_u8(self.mavtype as u8);
30781        for val in &self.serial_number {
30782            __tmp.put_u8(*val);
30783        }
30784        for val in &self.device_name {
30785            __tmp.put_u8(*val);
30786        }
30787        if matches!(version, MavlinkVersion::V2) {
30788            __tmp.put_u16_le(self.charging_maximum_voltage);
30789            __tmp.put_u8(self.cells_in_series);
30790            __tmp.put_u32_le(self.discharge_maximum_current);
30791            __tmp.put_u32_le(self.discharge_maximum_burst_current);
30792            for val in &self.manufacture_date {
30793                __tmp.put_u8(*val);
30794            }
30795            let len = __tmp.len();
30796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30797        } else {
30798            __tmp.len()
30799        }
30800    }
30801}
30802#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30803#[doc = ""]
30804#[doc = "ID: 253"]
30805#[derive(Debug, Clone, PartialEq)]
30806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30808#[cfg_attr(feature = "ts", derive(TS))]
30809#[cfg_attr(feature = "ts", ts(export))]
30810pub struct STATUSTEXT_DATA {
30811    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30812    pub severity: MavSeverity,
30813    #[doc = "Status text message, without null termination character"]
30814    #[cfg_attr(feature = "ts", ts(type = "string"))]
30815    pub text: CharArray<50>,
30816    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30818    pub id: u16,
30819    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30821    pub chunk_seq: u8,
30822}
30823impl STATUSTEXT_DATA {
30824    pub const ENCODED_LEN: usize = 54usize;
30825    pub const DEFAULT: Self = Self {
30826        severity: MavSeverity::DEFAULT,
30827        text: CharArray::new([0_u8; 50usize]),
30828        id: 0_u16,
30829        chunk_seq: 0_u8,
30830    };
30831    #[cfg(feature = "arbitrary")]
30832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30833        use arbitrary::{Arbitrary, Unstructured};
30834        let mut buf = [0u8; 1024];
30835        rng.fill_bytes(&mut buf);
30836        let mut unstructured = Unstructured::new(&buf);
30837        Self::arbitrary(&mut unstructured).unwrap_or_default()
30838    }
30839}
30840impl Default for STATUSTEXT_DATA {
30841    fn default() -> Self {
30842        Self::DEFAULT.clone()
30843    }
30844}
30845impl MessageData for STATUSTEXT_DATA {
30846    type Message = MavMessage;
30847    const ID: u32 = 253u32;
30848    const NAME: &'static str = "STATUSTEXT";
30849    const EXTRA_CRC: u8 = 83u8;
30850    const ENCODED_LEN: usize = 54usize;
30851    fn deser(
30852        _version: MavlinkVersion,
30853        __input: &[u8],
30854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30855        let avail_len = __input.len();
30856        let mut payload_buf = [0; Self::ENCODED_LEN];
30857        let mut buf = if avail_len < Self::ENCODED_LEN {
30858            payload_buf[0..avail_len].copy_from_slice(__input);
30859            Bytes::new(&payload_buf)
30860        } else {
30861            Bytes::new(__input)
30862        };
30863        let mut __struct = Self::default();
30864        let tmp = buf.get_u8();
30865        __struct.severity =
30866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30867                enum_type: "MavSeverity",
30868                value: tmp as u64,
30869            })?;
30870        let mut tmp = [0_u8; 50usize];
30871        for v in &mut tmp {
30872            *v = buf.get_u8();
30873        }
30874        __struct.text = CharArray::new(tmp);
30875        __struct.id = buf.get_u16_le();
30876        __struct.chunk_seq = buf.get_u8();
30877        Ok(__struct)
30878    }
30879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30880        let mut __tmp = BytesMut::new(bytes);
30881        #[allow(clippy::absurd_extreme_comparisons)]
30882        #[allow(unused_comparisons)]
30883        if __tmp.remaining() < Self::ENCODED_LEN {
30884            panic!(
30885                "buffer is too small (need {} bytes, but got {})",
30886                Self::ENCODED_LEN,
30887                __tmp.remaining(),
30888            )
30889        }
30890        __tmp.put_u8(self.severity as u8);
30891        for val in &self.text {
30892            __tmp.put_u8(*val);
30893        }
30894        if matches!(version, MavlinkVersion::V2) {
30895            __tmp.put_u16_le(self.id);
30896            __tmp.put_u8(self.chunk_seq);
30897            let len = __tmp.len();
30898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30899        } else {
30900            __tmp.len()
30901        }
30902    }
30903}
30904#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30905#[doc = ""]
30906#[doc = "ID: 261"]
30907#[derive(Debug, Clone, PartialEq)]
30908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30910#[cfg_attr(feature = "ts", derive(TS))]
30911#[cfg_attr(feature = "ts", ts(export))]
30912pub struct STORAGE_INFORMATION_DATA {
30913    #[doc = "Timestamp (time since system boot)."]
30914    pub time_boot_ms: u32,
30915    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30916    pub total_capacity: f32,
30917    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30918    pub used_capacity: f32,
30919    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30920    pub available_capacity: f32,
30921    #[doc = "Read speed."]
30922    pub read_speed: f32,
30923    #[doc = "Write speed."]
30924    pub write_speed: f32,
30925    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30926    pub storage_id: u8,
30927    #[doc = "Number of storage devices"]
30928    pub storage_count: u8,
30929    #[doc = "Status of storage"]
30930    pub status: StorageStatus,
30931    #[doc = "Type of storage"]
30932    #[cfg_attr(feature = "serde", serde(default))]
30933    pub mavtype: StorageType,
30934    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30936    #[cfg_attr(feature = "ts", ts(type = "string"))]
30937    pub name: CharArray<32>,
30938    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30939    #[cfg_attr(feature = "serde", serde(default))]
30940    pub storage_usage: StorageUsageFlag,
30941}
30942impl STORAGE_INFORMATION_DATA {
30943    pub const ENCODED_LEN: usize = 61usize;
30944    pub const DEFAULT: Self = Self {
30945        time_boot_ms: 0_u32,
30946        total_capacity: 0.0_f32,
30947        used_capacity: 0.0_f32,
30948        available_capacity: 0.0_f32,
30949        read_speed: 0.0_f32,
30950        write_speed: 0.0_f32,
30951        storage_id: 0_u8,
30952        storage_count: 0_u8,
30953        status: StorageStatus::DEFAULT,
30954        mavtype: StorageType::DEFAULT,
30955        name: CharArray::new([0_u8; 32usize]),
30956        storage_usage: StorageUsageFlag::DEFAULT,
30957    };
30958    #[cfg(feature = "arbitrary")]
30959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30960        use arbitrary::{Arbitrary, Unstructured};
30961        let mut buf = [0u8; 1024];
30962        rng.fill_bytes(&mut buf);
30963        let mut unstructured = Unstructured::new(&buf);
30964        Self::arbitrary(&mut unstructured).unwrap_or_default()
30965    }
30966}
30967impl Default for STORAGE_INFORMATION_DATA {
30968    fn default() -> Self {
30969        Self::DEFAULT.clone()
30970    }
30971}
30972impl MessageData for STORAGE_INFORMATION_DATA {
30973    type Message = MavMessage;
30974    const ID: u32 = 261u32;
30975    const NAME: &'static str = "STORAGE_INFORMATION";
30976    const EXTRA_CRC: u8 = 179u8;
30977    const ENCODED_LEN: usize = 61usize;
30978    fn deser(
30979        _version: MavlinkVersion,
30980        __input: &[u8],
30981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30982        let avail_len = __input.len();
30983        let mut payload_buf = [0; Self::ENCODED_LEN];
30984        let mut buf = if avail_len < Self::ENCODED_LEN {
30985            payload_buf[0..avail_len].copy_from_slice(__input);
30986            Bytes::new(&payload_buf)
30987        } else {
30988            Bytes::new(__input)
30989        };
30990        let mut __struct = Self::default();
30991        __struct.time_boot_ms = buf.get_u32_le();
30992        __struct.total_capacity = buf.get_f32_le();
30993        __struct.used_capacity = buf.get_f32_le();
30994        __struct.available_capacity = buf.get_f32_le();
30995        __struct.read_speed = buf.get_f32_le();
30996        __struct.write_speed = buf.get_f32_le();
30997        __struct.storage_id = buf.get_u8();
30998        __struct.storage_count = buf.get_u8();
30999        let tmp = buf.get_u8();
31000        __struct.status =
31001            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31002                enum_type: "StorageStatus",
31003                value: tmp as u64,
31004            })?;
31005        let tmp = buf.get_u8();
31006        __struct.mavtype =
31007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31008                enum_type: "StorageType",
31009                value: tmp as u64,
31010            })?;
31011        let mut tmp = [0_u8; 32usize];
31012        for v in &mut tmp {
31013            *v = buf.get_u8();
31014        }
31015        __struct.name = CharArray::new(tmp);
31016        let tmp = buf.get_u8();
31017        __struct.storage_usage = StorageUsageFlag::from_bits(tmp).ok_or(
31018            ::mavlink_core::error::ParserError::InvalidFlag {
31019                flag_type: "StorageUsageFlag",
31020                value: tmp as u64,
31021            },
31022        )?;
31023        Ok(__struct)
31024    }
31025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31026        let mut __tmp = BytesMut::new(bytes);
31027        #[allow(clippy::absurd_extreme_comparisons)]
31028        #[allow(unused_comparisons)]
31029        if __tmp.remaining() < Self::ENCODED_LEN {
31030            panic!(
31031                "buffer is too small (need {} bytes, but got {})",
31032                Self::ENCODED_LEN,
31033                __tmp.remaining(),
31034            )
31035        }
31036        __tmp.put_u32_le(self.time_boot_ms);
31037        __tmp.put_f32_le(self.total_capacity);
31038        __tmp.put_f32_le(self.used_capacity);
31039        __tmp.put_f32_le(self.available_capacity);
31040        __tmp.put_f32_le(self.read_speed);
31041        __tmp.put_f32_le(self.write_speed);
31042        __tmp.put_u8(self.storage_id);
31043        __tmp.put_u8(self.storage_count);
31044        __tmp.put_u8(self.status as u8);
31045        if matches!(version, MavlinkVersion::V2) {
31046            __tmp.put_u8(self.mavtype as u8);
31047            for val in &self.name {
31048                __tmp.put_u8(*val);
31049            }
31050            __tmp.put_u8(self.storage_usage.bits());
31051            let len = __tmp.len();
31052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31053        } else {
31054            __tmp.len()
31055        }
31056    }
31057}
31058#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31059#[doc = ""]
31060#[doc = "ID: 401"]
31061#[derive(Debug, Clone, PartialEq)]
31062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31064#[cfg_attr(feature = "ts", derive(TS))]
31065#[cfg_attr(feature = "ts", ts(export))]
31066pub struct SUPPORTED_TUNES_DATA {
31067    #[doc = "Bitfield of supported tune formats."]
31068    pub format: TuneFormat,
31069    #[doc = "System ID"]
31070    pub target_system: u8,
31071    #[doc = "Component ID"]
31072    pub target_component: u8,
31073}
31074impl SUPPORTED_TUNES_DATA {
31075    pub const ENCODED_LEN: usize = 6usize;
31076    pub const DEFAULT: Self = Self {
31077        format: TuneFormat::DEFAULT,
31078        target_system: 0_u8,
31079        target_component: 0_u8,
31080    };
31081    #[cfg(feature = "arbitrary")]
31082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31083        use arbitrary::{Arbitrary, Unstructured};
31084        let mut buf = [0u8; 1024];
31085        rng.fill_bytes(&mut buf);
31086        let mut unstructured = Unstructured::new(&buf);
31087        Self::arbitrary(&mut unstructured).unwrap_or_default()
31088    }
31089}
31090impl Default for SUPPORTED_TUNES_DATA {
31091    fn default() -> Self {
31092        Self::DEFAULT.clone()
31093    }
31094}
31095impl MessageData for SUPPORTED_TUNES_DATA {
31096    type Message = MavMessage;
31097    const ID: u32 = 401u32;
31098    const NAME: &'static str = "SUPPORTED_TUNES";
31099    const EXTRA_CRC: u8 = 183u8;
31100    const ENCODED_LEN: usize = 6usize;
31101    fn deser(
31102        _version: MavlinkVersion,
31103        __input: &[u8],
31104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31105        let avail_len = __input.len();
31106        let mut payload_buf = [0; Self::ENCODED_LEN];
31107        let mut buf = if avail_len < Self::ENCODED_LEN {
31108            payload_buf[0..avail_len].copy_from_slice(__input);
31109            Bytes::new(&payload_buf)
31110        } else {
31111            Bytes::new(__input)
31112        };
31113        let mut __struct = Self::default();
31114        let tmp = buf.get_u32_le();
31115        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31116            ::mavlink_core::error::ParserError::InvalidEnum {
31117                enum_type: "TuneFormat",
31118                value: tmp as u64,
31119            },
31120        )?;
31121        __struct.target_system = buf.get_u8();
31122        __struct.target_component = buf.get_u8();
31123        Ok(__struct)
31124    }
31125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31126        let mut __tmp = BytesMut::new(bytes);
31127        #[allow(clippy::absurd_extreme_comparisons)]
31128        #[allow(unused_comparisons)]
31129        if __tmp.remaining() < Self::ENCODED_LEN {
31130            panic!(
31131                "buffer is too small (need {} bytes, but got {})",
31132                Self::ENCODED_LEN,
31133                __tmp.remaining(),
31134            )
31135        }
31136        __tmp.put_u32_le(self.format as u32);
31137        __tmp.put_u8(self.target_system);
31138        __tmp.put_u8(self.target_component);
31139        if matches!(version, MavlinkVersion::V2) {
31140            let len = __tmp.len();
31141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31142        } else {
31143            __tmp.len()
31144        }
31145    }
31146}
31147#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31148#[doc = ""]
31149#[doc = "ID: 2"]
31150#[derive(Debug, Clone, PartialEq)]
31151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31153#[cfg_attr(feature = "ts", derive(TS))]
31154#[cfg_attr(feature = "ts", ts(export))]
31155pub struct SYSTEM_TIME_DATA {
31156    #[doc = "Timestamp (UNIX epoch time)."]
31157    pub time_unix_usec: u64,
31158    #[doc = "Timestamp (time since system boot)."]
31159    pub time_boot_ms: u32,
31160}
31161impl SYSTEM_TIME_DATA {
31162    pub const ENCODED_LEN: usize = 12usize;
31163    pub const DEFAULT: Self = Self {
31164        time_unix_usec: 0_u64,
31165        time_boot_ms: 0_u32,
31166    };
31167    #[cfg(feature = "arbitrary")]
31168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31169        use arbitrary::{Arbitrary, Unstructured};
31170        let mut buf = [0u8; 1024];
31171        rng.fill_bytes(&mut buf);
31172        let mut unstructured = Unstructured::new(&buf);
31173        Self::arbitrary(&mut unstructured).unwrap_or_default()
31174    }
31175}
31176impl Default for SYSTEM_TIME_DATA {
31177    fn default() -> Self {
31178        Self::DEFAULT.clone()
31179    }
31180}
31181impl MessageData for SYSTEM_TIME_DATA {
31182    type Message = MavMessage;
31183    const ID: u32 = 2u32;
31184    const NAME: &'static str = "SYSTEM_TIME";
31185    const EXTRA_CRC: u8 = 137u8;
31186    const ENCODED_LEN: usize = 12usize;
31187    fn deser(
31188        _version: MavlinkVersion,
31189        __input: &[u8],
31190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31191        let avail_len = __input.len();
31192        let mut payload_buf = [0; Self::ENCODED_LEN];
31193        let mut buf = if avail_len < Self::ENCODED_LEN {
31194            payload_buf[0..avail_len].copy_from_slice(__input);
31195            Bytes::new(&payload_buf)
31196        } else {
31197            Bytes::new(__input)
31198        };
31199        let mut __struct = Self::default();
31200        __struct.time_unix_usec = buf.get_u64_le();
31201        __struct.time_boot_ms = buf.get_u32_le();
31202        Ok(__struct)
31203    }
31204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31205        let mut __tmp = BytesMut::new(bytes);
31206        #[allow(clippy::absurd_extreme_comparisons)]
31207        #[allow(unused_comparisons)]
31208        if __tmp.remaining() < Self::ENCODED_LEN {
31209            panic!(
31210                "buffer is too small (need {} bytes, but got {})",
31211                Self::ENCODED_LEN,
31212                __tmp.remaining(),
31213            )
31214        }
31215        __tmp.put_u64_le(self.time_unix_usec);
31216        __tmp.put_u32_le(self.time_boot_ms);
31217        if matches!(version, MavlinkVersion::V2) {
31218            let len = __tmp.len();
31219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31220        } else {
31221            __tmp.len()
31222        }
31223    }
31224}
31225#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31226#[doc = ""]
31227#[doc = "ID: 1"]
31228#[derive(Debug, Clone, PartialEq)]
31229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31231#[cfg_attr(feature = "ts", derive(TS))]
31232#[cfg_attr(feature = "ts", ts(export))]
31233pub struct SYS_STATUS_DATA {
31234    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31235    pub onboard_control_sensors_present: MavSysStatusSensor,
31236    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31237    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31238    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31239    pub onboard_control_sensors_health: MavSysStatusSensor,
31240    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31241    pub load: u16,
31242    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31243    pub voltage_battery: u16,
31244    #[doc = "Battery current, -1: Current not sent by autopilot"]
31245    pub current_battery: i16,
31246    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31247    pub drop_rate_comm: u16,
31248    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31249    pub errors_comm: u16,
31250    #[doc = "Autopilot-specific errors"]
31251    pub errors_count1: u16,
31252    #[doc = "Autopilot-specific errors"]
31253    pub errors_count2: u16,
31254    #[doc = "Autopilot-specific errors"]
31255    pub errors_count3: u16,
31256    #[doc = "Autopilot-specific errors"]
31257    pub errors_count4: u16,
31258    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31259    pub battery_remaining: i8,
31260    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31261    #[cfg_attr(feature = "serde", serde(default))]
31262    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31263    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31264    #[cfg_attr(feature = "serde", serde(default))]
31265    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31266    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31267    #[cfg_attr(feature = "serde", serde(default))]
31268    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31269}
31270impl SYS_STATUS_DATA {
31271    pub const ENCODED_LEN: usize = 43usize;
31272    pub const DEFAULT: Self = Self {
31273        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31274        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31275        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31276        load: 0_u16,
31277        voltage_battery: 0_u16,
31278        current_battery: 0_i16,
31279        drop_rate_comm: 0_u16,
31280        errors_comm: 0_u16,
31281        errors_count1: 0_u16,
31282        errors_count2: 0_u16,
31283        errors_count3: 0_u16,
31284        errors_count4: 0_u16,
31285        battery_remaining: 0_i8,
31286        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31287        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31288        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31289    };
31290    #[cfg(feature = "arbitrary")]
31291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31292        use arbitrary::{Arbitrary, Unstructured};
31293        let mut buf = [0u8; 1024];
31294        rng.fill_bytes(&mut buf);
31295        let mut unstructured = Unstructured::new(&buf);
31296        Self::arbitrary(&mut unstructured).unwrap_or_default()
31297    }
31298}
31299impl Default for SYS_STATUS_DATA {
31300    fn default() -> Self {
31301        Self::DEFAULT.clone()
31302    }
31303}
31304impl MessageData for SYS_STATUS_DATA {
31305    type Message = MavMessage;
31306    const ID: u32 = 1u32;
31307    const NAME: &'static str = "SYS_STATUS";
31308    const EXTRA_CRC: u8 = 124u8;
31309    const ENCODED_LEN: usize = 43usize;
31310    fn deser(
31311        _version: MavlinkVersion,
31312        __input: &[u8],
31313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31314        let avail_len = __input.len();
31315        let mut payload_buf = [0; Self::ENCODED_LEN];
31316        let mut buf = if avail_len < Self::ENCODED_LEN {
31317            payload_buf[0..avail_len].copy_from_slice(__input);
31318            Bytes::new(&payload_buf)
31319        } else {
31320            Bytes::new(__input)
31321        };
31322        let mut __struct = Self::default();
31323        let tmp = buf.get_u32_le();
31324        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(tmp).ok_or(
31325            ::mavlink_core::error::ParserError::InvalidFlag {
31326                flag_type: "MavSysStatusSensor",
31327                value: tmp as u64,
31328            },
31329        )?;
31330        let tmp = buf.get_u32_le();
31331        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(tmp).ok_or(
31332            ::mavlink_core::error::ParserError::InvalidFlag {
31333                flag_type: "MavSysStatusSensor",
31334                value: tmp as u64,
31335            },
31336        )?;
31337        let tmp = buf.get_u32_le();
31338        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(tmp).ok_or(
31339            ::mavlink_core::error::ParserError::InvalidFlag {
31340                flag_type: "MavSysStatusSensor",
31341                value: tmp as u64,
31342            },
31343        )?;
31344        __struct.load = buf.get_u16_le();
31345        __struct.voltage_battery = buf.get_u16_le();
31346        __struct.current_battery = buf.get_i16_le();
31347        __struct.drop_rate_comm = buf.get_u16_le();
31348        __struct.errors_comm = buf.get_u16_le();
31349        __struct.errors_count1 = buf.get_u16_le();
31350        __struct.errors_count2 = buf.get_u16_le();
31351        __struct.errors_count3 = buf.get_u16_le();
31352        __struct.errors_count4 = buf.get_u16_le();
31353        __struct.battery_remaining = buf.get_i8();
31354        let tmp = buf.get_u32_le();
31355        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31356            tmp,
31357        )
31358        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31359            flag_type: "MavSysStatusSensorExtended",
31360            value: tmp as u64,
31361        })?;
31362        let tmp = buf.get_u32_le();
31363        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31364            tmp,
31365        )
31366        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31367            flag_type: "MavSysStatusSensorExtended",
31368            value: tmp as u64,
31369        })?;
31370        let tmp = buf.get_u32_le();
31371        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31372            tmp,
31373        )
31374        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31375            flag_type: "MavSysStatusSensorExtended",
31376            value: tmp as u64,
31377        })?;
31378        Ok(__struct)
31379    }
31380    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31381        let mut __tmp = BytesMut::new(bytes);
31382        #[allow(clippy::absurd_extreme_comparisons)]
31383        #[allow(unused_comparisons)]
31384        if __tmp.remaining() < Self::ENCODED_LEN {
31385            panic!(
31386                "buffer is too small (need {} bytes, but got {})",
31387                Self::ENCODED_LEN,
31388                __tmp.remaining(),
31389            )
31390        }
31391        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
31392        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
31393        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
31394        __tmp.put_u16_le(self.load);
31395        __tmp.put_u16_le(self.voltage_battery);
31396        __tmp.put_i16_le(self.current_battery);
31397        __tmp.put_u16_le(self.drop_rate_comm);
31398        __tmp.put_u16_le(self.errors_comm);
31399        __tmp.put_u16_le(self.errors_count1);
31400        __tmp.put_u16_le(self.errors_count2);
31401        __tmp.put_u16_le(self.errors_count3);
31402        __tmp.put_u16_le(self.errors_count4);
31403        __tmp.put_i8(self.battery_remaining);
31404        if matches!(version, MavlinkVersion::V2) {
31405            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
31406            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
31407            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
31408            let len = __tmp.len();
31409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31410        } else {
31411            __tmp.len()
31412        }
31413    }
31414}
31415#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31416#[doc = ""]
31417#[doc = "ID: 135"]
31418#[derive(Debug, Clone, PartialEq)]
31419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31421#[cfg_attr(feature = "ts", derive(TS))]
31422#[cfg_attr(feature = "ts", ts(export))]
31423pub struct TERRAIN_CHECK_DATA {
31424    #[doc = "Latitude"]
31425    pub lat: i32,
31426    #[doc = "Longitude"]
31427    pub lon: i32,
31428}
31429impl TERRAIN_CHECK_DATA {
31430    pub const ENCODED_LEN: usize = 8usize;
31431    pub const DEFAULT: Self = Self {
31432        lat: 0_i32,
31433        lon: 0_i32,
31434    };
31435    #[cfg(feature = "arbitrary")]
31436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31437        use arbitrary::{Arbitrary, Unstructured};
31438        let mut buf = [0u8; 1024];
31439        rng.fill_bytes(&mut buf);
31440        let mut unstructured = Unstructured::new(&buf);
31441        Self::arbitrary(&mut unstructured).unwrap_or_default()
31442    }
31443}
31444impl Default for TERRAIN_CHECK_DATA {
31445    fn default() -> Self {
31446        Self::DEFAULT.clone()
31447    }
31448}
31449impl MessageData for TERRAIN_CHECK_DATA {
31450    type Message = MavMessage;
31451    const ID: u32 = 135u32;
31452    const NAME: &'static str = "TERRAIN_CHECK";
31453    const EXTRA_CRC: u8 = 203u8;
31454    const ENCODED_LEN: usize = 8usize;
31455    fn deser(
31456        _version: MavlinkVersion,
31457        __input: &[u8],
31458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31459        let avail_len = __input.len();
31460        let mut payload_buf = [0; Self::ENCODED_LEN];
31461        let mut buf = if avail_len < Self::ENCODED_LEN {
31462            payload_buf[0..avail_len].copy_from_slice(__input);
31463            Bytes::new(&payload_buf)
31464        } else {
31465            Bytes::new(__input)
31466        };
31467        let mut __struct = Self::default();
31468        __struct.lat = buf.get_i32_le();
31469        __struct.lon = buf.get_i32_le();
31470        Ok(__struct)
31471    }
31472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31473        let mut __tmp = BytesMut::new(bytes);
31474        #[allow(clippy::absurd_extreme_comparisons)]
31475        #[allow(unused_comparisons)]
31476        if __tmp.remaining() < Self::ENCODED_LEN {
31477            panic!(
31478                "buffer is too small (need {} bytes, but got {})",
31479                Self::ENCODED_LEN,
31480                __tmp.remaining(),
31481            )
31482        }
31483        __tmp.put_i32_le(self.lat);
31484        __tmp.put_i32_le(self.lon);
31485        if matches!(version, MavlinkVersion::V2) {
31486            let len = __tmp.len();
31487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31488        } else {
31489            __tmp.len()
31490        }
31491    }
31492}
31493#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31494#[doc = ""]
31495#[doc = "ID: 134"]
31496#[derive(Debug, Clone, PartialEq)]
31497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31499#[cfg_attr(feature = "ts", derive(TS))]
31500#[cfg_attr(feature = "ts", ts(export))]
31501pub struct TERRAIN_DATA_DATA {
31502    #[doc = "Latitude of SW corner of first grid"]
31503    pub lat: i32,
31504    #[doc = "Longitude of SW corner of first grid"]
31505    pub lon: i32,
31506    #[doc = "Grid spacing"]
31507    pub grid_spacing: u16,
31508    #[doc = "Terrain data MSL"]
31509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31511    pub data: [i16; 16],
31512    #[doc = "bit within the terrain request mask"]
31513    pub gridbit: u8,
31514}
31515impl TERRAIN_DATA_DATA {
31516    pub const ENCODED_LEN: usize = 43usize;
31517    pub const DEFAULT: Self = Self {
31518        lat: 0_i32,
31519        lon: 0_i32,
31520        grid_spacing: 0_u16,
31521        data: [0_i16; 16usize],
31522        gridbit: 0_u8,
31523    };
31524    #[cfg(feature = "arbitrary")]
31525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31526        use arbitrary::{Arbitrary, Unstructured};
31527        let mut buf = [0u8; 1024];
31528        rng.fill_bytes(&mut buf);
31529        let mut unstructured = Unstructured::new(&buf);
31530        Self::arbitrary(&mut unstructured).unwrap_or_default()
31531    }
31532}
31533impl Default for TERRAIN_DATA_DATA {
31534    fn default() -> Self {
31535        Self::DEFAULT.clone()
31536    }
31537}
31538impl MessageData for TERRAIN_DATA_DATA {
31539    type Message = MavMessage;
31540    const ID: u32 = 134u32;
31541    const NAME: &'static str = "TERRAIN_DATA";
31542    const EXTRA_CRC: u8 = 229u8;
31543    const ENCODED_LEN: usize = 43usize;
31544    fn deser(
31545        _version: MavlinkVersion,
31546        __input: &[u8],
31547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31548        let avail_len = __input.len();
31549        let mut payload_buf = [0; Self::ENCODED_LEN];
31550        let mut buf = if avail_len < Self::ENCODED_LEN {
31551            payload_buf[0..avail_len].copy_from_slice(__input);
31552            Bytes::new(&payload_buf)
31553        } else {
31554            Bytes::new(__input)
31555        };
31556        let mut __struct = Self::default();
31557        __struct.lat = buf.get_i32_le();
31558        __struct.lon = buf.get_i32_le();
31559        __struct.grid_spacing = buf.get_u16_le();
31560        for v in &mut __struct.data {
31561            let val = buf.get_i16_le();
31562            *v = val;
31563        }
31564        __struct.gridbit = buf.get_u8();
31565        Ok(__struct)
31566    }
31567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31568        let mut __tmp = BytesMut::new(bytes);
31569        #[allow(clippy::absurd_extreme_comparisons)]
31570        #[allow(unused_comparisons)]
31571        if __tmp.remaining() < Self::ENCODED_LEN {
31572            panic!(
31573                "buffer is too small (need {} bytes, but got {})",
31574                Self::ENCODED_LEN,
31575                __tmp.remaining(),
31576            )
31577        }
31578        __tmp.put_i32_le(self.lat);
31579        __tmp.put_i32_le(self.lon);
31580        __tmp.put_u16_le(self.grid_spacing);
31581        for val in &self.data {
31582            __tmp.put_i16_le(*val);
31583        }
31584        __tmp.put_u8(self.gridbit);
31585        if matches!(version, MavlinkVersion::V2) {
31586            let len = __tmp.len();
31587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31588        } else {
31589            __tmp.len()
31590        }
31591    }
31592}
31593#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31594#[doc = ""]
31595#[doc = "ID: 136"]
31596#[derive(Debug, Clone, PartialEq)]
31597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31599#[cfg_attr(feature = "ts", derive(TS))]
31600#[cfg_attr(feature = "ts", ts(export))]
31601pub struct TERRAIN_REPORT_DATA {
31602    #[doc = "Latitude"]
31603    pub lat: i32,
31604    #[doc = "Longitude"]
31605    pub lon: i32,
31606    #[doc = "Terrain height MSL"]
31607    pub terrain_height: f32,
31608    #[doc = "Current vehicle height above lat/lon terrain height"]
31609    pub current_height: f32,
31610    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31611    pub spacing: u16,
31612    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31613    pub pending: u16,
31614    #[doc = "Number of 4x4 terrain blocks in memory"]
31615    pub loaded: u16,
31616}
31617impl TERRAIN_REPORT_DATA {
31618    pub const ENCODED_LEN: usize = 22usize;
31619    pub const DEFAULT: Self = Self {
31620        lat: 0_i32,
31621        lon: 0_i32,
31622        terrain_height: 0.0_f32,
31623        current_height: 0.0_f32,
31624        spacing: 0_u16,
31625        pending: 0_u16,
31626        loaded: 0_u16,
31627    };
31628    #[cfg(feature = "arbitrary")]
31629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31630        use arbitrary::{Arbitrary, Unstructured};
31631        let mut buf = [0u8; 1024];
31632        rng.fill_bytes(&mut buf);
31633        let mut unstructured = Unstructured::new(&buf);
31634        Self::arbitrary(&mut unstructured).unwrap_or_default()
31635    }
31636}
31637impl Default for TERRAIN_REPORT_DATA {
31638    fn default() -> Self {
31639        Self::DEFAULT.clone()
31640    }
31641}
31642impl MessageData for TERRAIN_REPORT_DATA {
31643    type Message = MavMessage;
31644    const ID: u32 = 136u32;
31645    const NAME: &'static str = "TERRAIN_REPORT";
31646    const EXTRA_CRC: u8 = 1u8;
31647    const ENCODED_LEN: usize = 22usize;
31648    fn deser(
31649        _version: MavlinkVersion,
31650        __input: &[u8],
31651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31652        let avail_len = __input.len();
31653        let mut payload_buf = [0; Self::ENCODED_LEN];
31654        let mut buf = if avail_len < Self::ENCODED_LEN {
31655            payload_buf[0..avail_len].copy_from_slice(__input);
31656            Bytes::new(&payload_buf)
31657        } else {
31658            Bytes::new(__input)
31659        };
31660        let mut __struct = Self::default();
31661        __struct.lat = buf.get_i32_le();
31662        __struct.lon = buf.get_i32_le();
31663        __struct.terrain_height = buf.get_f32_le();
31664        __struct.current_height = buf.get_f32_le();
31665        __struct.spacing = buf.get_u16_le();
31666        __struct.pending = buf.get_u16_le();
31667        __struct.loaded = buf.get_u16_le();
31668        Ok(__struct)
31669    }
31670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31671        let mut __tmp = BytesMut::new(bytes);
31672        #[allow(clippy::absurd_extreme_comparisons)]
31673        #[allow(unused_comparisons)]
31674        if __tmp.remaining() < Self::ENCODED_LEN {
31675            panic!(
31676                "buffer is too small (need {} bytes, but got {})",
31677                Self::ENCODED_LEN,
31678                __tmp.remaining(),
31679            )
31680        }
31681        __tmp.put_i32_le(self.lat);
31682        __tmp.put_i32_le(self.lon);
31683        __tmp.put_f32_le(self.terrain_height);
31684        __tmp.put_f32_le(self.current_height);
31685        __tmp.put_u16_le(self.spacing);
31686        __tmp.put_u16_le(self.pending);
31687        __tmp.put_u16_le(self.loaded);
31688        if matches!(version, MavlinkVersion::V2) {
31689            let len = __tmp.len();
31690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31691        } else {
31692            __tmp.len()
31693        }
31694    }
31695}
31696#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31697#[doc = ""]
31698#[doc = "ID: 133"]
31699#[derive(Debug, Clone, PartialEq)]
31700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31702#[cfg_attr(feature = "ts", derive(TS))]
31703#[cfg_attr(feature = "ts", ts(export))]
31704pub struct TERRAIN_REQUEST_DATA {
31705    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31706    pub mask: u64,
31707    #[doc = "Latitude of SW corner of first grid"]
31708    pub lat: i32,
31709    #[doc = "Longitude of SW corner of first grid"]
31710    pub lon: i32,
31711    #[doc = "Grid spacing"]
31712    pub grid_spacing: u16,
31713}
31714impl TERRAIN_REQUEST_DATA {
31715    pub const ENCODED_LEN: usize = 18usize;
31716    pub const DEFAULT: Self = Self {
31717        mask: 0_u64,
31718        lat: 0_i32,
31719        lon: 0_i32,
31720        grid_spacing: 0_u16,
31721    };
31722    #[cfg(feature = "arbitrary")]
31723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31724        use arbitrary::{Arbitrary, Unstructured};
31725        let mut buf = [0u8; 1024];
31726        rng.fill_bytes(&mut buf);
31727        let mut unstructured = Unstructured::new(&buf);
31728        Self::arbitrary(&mut unstructured).unwrap_or_default()
31729    }
31730}
31731impl Default for TERRAIN_REQUEST_DATA {
31732    fn default() -> Self {
31733        Self::DEFAULT.clone()
31734    }
31735}
31736impl MessageData for TERRAIN_REQUEST_DATA {
31737    type Message = MavMessage;
31738    const ID: u32 = 133u32;
31739    const NAME: &'static str = "TERRAIN_REQUEST";
31740    const EXTRA_CRC: u8 = 6u8;
31741    const ENCODED_LEN: usize = 18usize;
31742    fn deser(
31743        _version: MavlinkVersion,
31744        __input: &[u8],
31745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31746        let avail_len = __input.len();
31747        let mut payload_buf = [0; Self::ENCODED_LEN];
31748        let mut buf = if avail_len < Self::ENCODED_LEN {
31749            payload_buf[0..avail_len].copy_from_slice(__input);
31750            Bytes::new(&payload_buf)
31751        } else {
31752            Bytes::new(__input)
31753        };
31754        let mut __struct = Self::default();
31755        __struct.mask = buf.get_u64_le();
31756        __struct.lat = buf.get_i32_le();
31757        __struct.lon = buf.get_i32_le();
31758        __struct.grid_spacing = buf.get_u16_le();
31759        Ok(__struct)
31760    }
31761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31762        let mut __tmp = BytesMut::new(bytes);
31763        #[allow(clippy::absurd_extreme_comparisons)]
31764        #[allow(unused_comparisons)]
31765        if __tmp.remaining() < Self::ENCODED_LEN {
31766            panic!(
31767                "buffer is too small (need {} bytes, but got {})",
31768                Self::ENCODED_LEN,
31769                __tmp.remaining(),
31770            )
31771        }
31772        __tmp.put_u64_le(self.mask);
31773        __tmp.put_i32_le(self.lat);
31774        __tmp.put_i32_le(self.lon);
31775        __tmp.put_u16_le(self.grid_spacing);
31776        if matches!(version, MavlinkVersion::V2) {
31777            let len = __tmp.len();
31778            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31779        } else {
31780            __tmp.len()
31781        }
31782    }
31783}
31784#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31785#[doc = ""]
31786#[doc = "ID: 111"]
31787#[derive(Debug, Clone, PartialEq)]
31788#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31790#[cfg_attr(feature = "ts", derive(TS))]
31791#[cfg_attr(feature = "ts", ts(export))]
31792pub struct TIMESYNC_DATA {
31793    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31794    pub tc1: i64,
31795    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31796    pub ts1: i64,
31797    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31799    pub target_system: u8,
31800    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31802    pub target_component: u8,
31803}
31804impl TIMESYNC_DATA {
31805    pub const ENCODED_LEN: usize = 18usize;
31806    pub const DEFAULT: Self = Self {
31807        tc1: 0_i64,
31808        ts1: 0_i64,
31809        target_system: 0_u8,
31810        target_component: 0_u8,
31811    };
31812    #[cfg(feature = "arbitrary")]
31813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31814        use arbitrary::{Arbitrary, Unstructured};
31815        let mut buf = [0u8; 1024];
31816        rng.fill_bytes(&mut buf);
31817        let mut unstructured = Unstructured::new(&buf);
31818        Self::arbitrary(&mut unstructured).unwrap_or_default()
31819    }
31820}
31821impl Default for TIMESYNC_DATA {
31822    fn default() -> Self {
31823        Self::DEFAULT.clone()
31824    }
31825}
31826impl MessageData for TIMESYNC_DATA {
31827    type Message = MavMessage;
31828    const ID: u32 = 111u32;
31829    const NAME: &'static str = "TIMESYNC";
31830    const EXTRA_CRC: u8 = 34u8;
31831    const ENCODED_LEN: usize = 18usize;
31832    fn deser(
31833        _version: MavlinkVersion,
31834        __input: &[u8],
31835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31836        let avail_len = __input.len();
31837        let mut payload_buf = [0; Self::ENCODED_LEN];
31838        let mut buf = if avail_len < Self::ENCODED_LEN {
31839            payload_buf[0..avail_len].copy_from_slice(__input);
31840            Bytes::new(&payload_buf)
31841        } else {
31842            Bytes::new(__input)
31843        };
31844        let mut __struct = Self::default();
31845        __struct.tc1 = buf.get_i64_le();
31846        __struct.ts1 = buf.get_i64_le();
31847        __struct.target_system = buf.get_u8();
31848        __struct.target_component = buf.get_u8();
31849        Ok(__struct)
31850    }
31851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31852        let mut __tmp = BytesMut::new(bytes);
31853        #[allow(clippy::absurd_extreme_comparisons)]
31854        #[allow(unused_comparisons)]
31855        if __tmp.remaining() < Self::ENCODED_LEN {
31856            panic!(
31857                "buffer is too small (need {} bytes, but got {})",
31858                Self::ENCODED_LEN,
31859                __tmp.remaining(),
31860            )
31861        }
31862        __tmp.put_i64_le(self.tc1);
31863        __tmp.put_i64_le(self.ts1);
31864        if matches!(version, MavlinkVersion::V2) {
31865            __tmp.put_u8(self.target_system);
31866            __tmp.put_u8(self.target_component);
31867            let len = __tmp.len();
31868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31869        } else {
31870            __tmp.len()
31871        }
31872    }
31873}
31874#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31875#[doc = ""]
31876#[doc = "ID: 380"]
31877#[derive(Debug, Clone, PartialEq)]
31878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31880#[cfg_attr(feature = "ts", derive(TS))]
31881#[cfg_attr(feature = "ts", ts(export))]
31882pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31883    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31884    pub safe_return: i32,
31885    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31886    pub land: i32,
31887    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31888    pub mission_next_item: i32,
31889    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31890    pub mission_end: i32,
31891    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31892    pub commanded_action: i32,
31893}
31894impl TIME_ESTIMATE_TO_TARGET_DATA {
31895    pub const ENCODED_LEN: usize = 20usize;
31896    pub const DEFAULT: Self = Self {
31897        safe_return: 0_i32,
31898        land: 0_i32,
31899        mission_next_item: 0_i32,
31900        mission_end: 0_i32,
31901        commanded_action: 0_i32,
31902    };
31903    #[cfg(feature = "arbitrary")]
31904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31905        use arbitrary::{Arbitrary, Unstructured};
31906        let mut buf = [0u8; 1024];
31907        rng.fill_bytes(&mut buf);
31908        let mut unstructured = Unstructured::new(&buf);
31909        Self::arbitrary(&mut unstructured).unwrap_or_default()
31910    }
31911}
31912impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31913    fn default() -> Self {
31914        Self::DEFAULT.clone()
31915    }
31916}
31917impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31918    type Message = MavMessage;
31919    const ID: u32 = 380u32;
31920    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31921    const EXTRA_CRC: u8 = 232u8;
31922    const ENCODED_LEN: usize = 20usize;
31923    fn deser(
31924        _version: MavlinkVersion,
31925        __input: &[u8],
31926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31927        let avail_len = __input.len();
31928        let mut payload_buf = [0; Self::ENCODED_LEN];
31929        let mut buf = if avail_len < Self::ENCODED_LEN {
31930            payload_buf[0..avail_len].copy_from_slice(__input);
31931            Bytes::new(&payload_buf)
31932        } else {
31933            Bytes::new(__input)
31934        };
31935        let mut __struct = Self::default();
31936        __struct.safe_return = buf.get_i32_le();
31937        __struct.land = buf.get_i32_le();
31938        __struct.mission_next_item = buf.get_i32_le();
31939        __struct.mission_end = buf.get_i32_le();
31940        __struct.commanded_action = buf.get_i32_le();
31941        Ok(__struct)
31942    }
31943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31944        let mut __tmp = BytesMut::new(bytes);
31945        #[allow(clippy::absurd_extreme_comparisons)]
31946        #[allow(unused_comparisons)]
31947        if __tmp.remaining() < Self::ENCODED_LEN {
31948            panic!(
31949                "buffer is too small (need {} bytes, but got {})",
31950                Self::ENCODED_LEN,
31951                __tmp.remaining(),
31952            )
31953        }
31954        __tmp.put_i32_le(self.safe_return);
31955        __tmp.put_i32_le(self.land);
31956        __tmp.put_i32_le(self.mission_next_item);
31957        __tmp.put_i32_le(self.mission_end);
31958        __tmp.put_i32_le(self.commanded_action);
31959        if matches!(version, MavlinkVersion::V2) {
31960            let len = __tmp.len();
31961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31962        } else {
31963            __tmp.len()
31964        }
31965    }
31966}
31967#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31968#[doc = ""]
31969#[doc = "ID: 333"]
31970#[derive(Debug, Clone, PartialEq)]
31971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31973#[cfg_attr(feature = "ts", derive(TS))]
31974#[cfg_attr(feature = "ts", ts(export))]
31975pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31976    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31977    pub time_usec: u64,
31978    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31981    pub pos_x: [f32; 5],
31982    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31984    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31985    pub pos_y: [f32; 5],
31986    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31988    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31989    pub pos_z: [f32; 5],
31990    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31992    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31993    pub delta: [f32; 5],
31994    #[doc = "Yaw. Set to NaN for unchanged"]
31995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31997    pub pos_yaw: [f32; 5],
31998    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31999    pub valid_points: u8,
32000}
32001impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32002    pub const ENCODED_LEN: usize = 109usize;
32003    pub const DEFAULT: Self = Self {
32004        time_usec: 0_u64,
32005        pos_x: [0.0_f32; 5usize],
32006        pos_y: [0.0_f32; 5usize],
32007        pos_z: [0.0_f32; 5usize],
32008        delta: [0.0_f32; 5usize],
32009        pos_yaw: [0.0_f32; 5usize],
32010        valid_points: 0_u8,
32011    };
32012    #[cfg(feature = "arbitrary")]
32013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32014        use arbitrary::{Arbitrary, Unstructured};
32015        let mut buf = [0u8; 1024];
32016        rng.fill_bytes(&mut buf);
32017        let mut unstructured = Unstructured::new(&buf);
32018        Self::arbitrary(&mut unstructured).unwrap_or_default()
32019    }
32020}
32021impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32022    fn default() -> Self {
32023        Self::DEFAULT.clone()
32024    }
32025}
32026impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32027    type Message = MavMessage;
32028    const ID: u32 = 333u32;
32029    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32030    const EXTRA_CRC: u8 = 231u8;
32031    const ENCODED_LEN: usize = 109usize;
32032    fn deser(
32033        _version: MavlinkVersion,
32034        __input: &[u8],
32035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32036        let avail_len = __input.len();
32037        let mut payload_buf = [0; Self::ENCODED_LEN];
32038        let mut buf = if avail_len < Self::ENCODED_LEN {
32039            payload_buf[0..avail_len].copy_from_slice(__input);
32040            Bytes::new(&payload_buf)
32041        } else {
32042            Bytes::new(__input)
32043        };
32044        let mut __struct = Self::default();
32045        __struct.time_usec = buf.get_u64_le();
32046        for v in &mut __struct.pos_x {
32047            let val = buf.get_f32_le();
32048            *v = val;
32049        }
32050        for v in &mut __struct.pos_y {
32051            let val = buf.get_f32_le();
32052            *v = val;
32053        }
32054        for v in &mut __struct.pos_z {
32055            let val = buf.get_f32_le();
32056            *v = val;
32057        }
32058        for v in &mut __struct.delta {
32059            let val = buf.get_f32_le();
32060            *v = val;
32061        }
32062        for v in &mut __struct.pos_yaw {
32063            let val = buf.get_f32_le();
32064            *v = val;
32065        }
32066        __struct.valid_points = buf.get_u8();
32067        Ok(__struct)
32068    }
32069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32070        let mut __tmp = BytesMut::new(bytes);
32071        #[allow(clippy::absurd_extreme_comparisons)]
32072        #[allow(unused_comparisons)]
32073        if __tmp.remaining() < Self::ENCODED_LEN {
32074            panic!(
32075                "buffer is too small (need {} bytes, but got {})",
32076                Self::ENCODED_LEN,
32077                __tmp.remaining(),
32078            )
32079        }
32080        __tmp.put_u64_le(self.time_usec);
32081        for val in &self.pos_x {
32082            __tmp.put_f32_le(*val);
32083        }
32084        for val in &self.pos_y {
32085            __tmp.put_f32_le(*val);
32086        }
32087        for val in &self.pos_z {
32088            __tmp.put_f32_le(*val);
32089        }
32090        for val in &self.delta {
32091            __tmp.put_f32_le(*val);
32092        }
32093        for val in &self.pos_yaw {
32094            __tmp.put_f32_le(*val);
32095        }
32096        __tmp.put_u8(self.valid_points);
32097        if matches!(version, MavlinkVersion::V2) {
32098            let len = __tmp.len();
32099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32100        } else {
32101            __tmp.len()
32102        }
32103    }
32104}
32105#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32106#[doc = ""]
32107#[doc = "ID: 332"]
32108#[derive(Debug, Clone, PartialEq)]
32109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32111#[cfg_attr(feature = "ts", derive(TS))]
32112#[cfg_attr(feature = "ts", ts(export))]
32113pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32114    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32115    pub time_usec: u64,
32116    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32118    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32119    pub pos_x: [f32; 5],
32120    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32123    pub pos_y: [f32; 5],
32124    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32127    pub pos_z: [f32; 5],
32128    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32131    pub vel_x: [f32; 5],
32132    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32135    pub vel_y: [f32; 5],
32136    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32139    pub vel_z: [f32; 5],
32140    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32143    pub acc_x: [f32; 5],
32144    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32147    pub acc_y: [f32; 5],
32148    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32151    pub acc_z: [f32; 5],
32152    #[doc = "Yaw angle, set to NaN if not being used"]
32153    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32154    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32155    pub pos_yaw: [f32; 5],
32156    #[doc = "Yaw rate, set to NaN if not being used"]
32157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32159    pub vel_yaw: [f32; 5],
32160    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32163    pub command: [u16; 5],
32164    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32165    pub valid_points: u8,
32166}
32167impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32168    pub const ENCODED_LEN: usize = 239usize;
32169    pub const DEFAULT: Self = Self {
32170        time_usec: 0_u64,
32171        pos_x: [0.0_f32; 5usize],
32172        pos_y: [0.0_f32; 5usize],
32173        pos_z: [0.0_f32; 5usize],
32174        vel_x: [0.0_f32; 5usize],
32175        vel_y: [0.0_f32; 5usize],
32176        vel_z: [0.0_f32; 5usize],
32177        acc_x: [0.0_f32; 5usize],
32178        acc_y: [0.0_f32; 5usize],
32179        acc_z: [0.0_f32; 5usize],
32180        pos_yaw: [0.0_f32; 5usize],
32181        vel_yaw: [0.0_f32; 5usize],
32182        command: [0_u16; 5usize],
32183        valid_points: 0_u8,
32184    };
32185    #[cfg(feature = "arbitrary")]
32186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32187        use arbitrary::{Arbitrary, Unstructured};
32188        let mut buf = [0u8; 1024];
32189        rng.fill_bytes(&mut buf);
32190        let mut unstructured = Unstructured::new(&buf);
32191        Self::arbitrary(&mut unstructured).unwrap_or_default()
32192    }
32193}
32194impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32195    fn default() -> Self {
32196        Self::DEFAULT.clone()
32197    }
32198}
32199impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32200    type Message = MavMessage;
32201    const ID: u32 = 332u32;
32202    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32203    const EXTRA_CRC: u8 = 236u8;
32204    const ENCODED_LEN: usize = 239usize;
32205    fn deser(
32206        _version: MavlinkVersion,
32207        __input: &[u8],
32208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32209        let avail_len = __input.len();
32210        let mut payload_buf = [0; Self::ENCODED_LEN];
32211        let mut buf = if avail_len < Self::ENCODED_LEN {
32212            payload_buf[0..avail_len].copy_from_slice(__input);
32213            Bytes::new(&payload_buf)
32214        } else {
32215            Bytes::new(__input)
32216        };
32217        let mut __struct = Self::default();
32218        __struct.time_usec = buf.get_u64_le();
32219        for v in &mut __struct.pos_x {
32220            let val = buf.get_f32_le();
32221            *v = val;
32222        }
32223        for v in &mut __struct.pos_y {
32224            let val = buf.get_f32_le();
32225            *v = val;
32226        }
32227        for v in &mut __struct.pos_z {
32228            let val = buf.get_f32_le();
32229            *v = val;
32230        }
32231        for v in &mut __struct.vel_x {
32232            let val = buf.get_f32_le();
32233            *v = val;
32234        }
32235        for v in &mut __struct.vel_y {
32236            let val = buf.get_f32_le();
32237            *v = val;
32238        }
32239        for v in &mut __struct.vel_z {
32240            let val = buf.get_f32_le();
32241            *v = val;
32242        }
32243        for v in &mut __struct.acc_x {
32244            let val = buf.get_f32_le();
32245            *v = val;
32246        }
32247        for v in &mut __struct.acc_y {
32248            let val = buf.get_f32_le();
32249            *v = val;
32250        }
32251        for v in &mut __struct.acc_z {
32252            let val = buf.get_f32_le();
32253            *v = val;
32254        }
32255        for v in &mut __struct.pos_yaw {
32256            let val = buf.get_f32_le();
32257            *v = val;
32258        }
32259        for v in &mut __struct.vel_yaw {
32260            let val = buf.get_f32_le();
32261            *v = val;
32262        }
32263        for v in &mut __struct.command {
32264            let val = buf.get_u16_le();
32265            *v = val;
32266        }
32267        __struct.valid_points = buf.get_u8();
32268        Ok(__struct)
32269    }
32270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32271        let mut __tmp = BytesMut::new(bytes);
32272        #[allow(clippy::absurd_extreme_comparisons)]
32273        #[allow(unused_comparisons)]
32274        if __tmp.remaining() < Self::ENCODED_LEN {
32275            panic!(
32276                "buffer is too small (need {} bytes, but got {})",
32277                Self::ENCODED_LEN,
32278                __tmp.remaining(),
32279            )
32280        }
32281        __tmp.put_u64_le(self.time_usec);
32282        for val in &self.pos_x {
32283            __tmp.put_f32_le(*val);
32284        }
32285        for val in &self.pos_y {
32286            __tmp.put_f32_le(*val);
32287        }
32288        for val in &self.pos_z {
32289            __tmp.put_f32_le(*val);
32290        }
32291        for val in &self.vel_x {
32292            __tmp.put_f32_le(*val);
32293        }
32294        for val in &self.vel_y {
32295            __tmp.put_f32_le(*val);
32296        }
32297        for val in &self.vel_z {
32298            __tmp.put_f32_le(*val);
32299        }
32300        for val in &self.acc_x {
32301            __tmp.put_f32_le(*val);
32302        }
32303        for val in &self.acc_y {
32304            __tmp.put_f32_le(*val);
32305        }
32306        for val in &self.acc_z {
32307            __tmp.put_f32_le(*val);
32308        }
32309        for val in &self.pos_yaw {
32310            __tmp.put_f32_le(*val);
32311        }
32312        for val in &self.vel_yaw {
32313            __tmp.put_f32_le(*val);
32314        }
32315        for val in &self.command {
32316            __tmp.put_u16_le(*val);
32317        }
32318        __tmp.put_u8(self.valid_points);
32319        if matches!(version, MavlinkVersion::V2) {
32320            let len = __tmp.len();
32321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32322        } else {
32323            __tmp.len()
32324        }
32325    }
32326}
32327#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32328#[doc = ""]
32329#[doc = "ID: 385"]
32330#[derive(Debug, Clone, PartialEq)]
32331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32333#[cfg_attr(feature = "ts", derive(TS))]
32334#[cfg_attr(feature = "ts", ts(export))]
32335pub struct TUNNEL_DATA {
32336    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32337    pub payload_type: MavTunnelPayloadType,
32338    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32339    pub target_system: u8,
32340    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32341    pub target_component: u8,
32342    #[doc = "Length of the data transported in payload"]
32343    pub payload_length: u8,
32344    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32346    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32347    pub payload: [u8; 128],
32348}
32349impl TUNNEL_DATA {
32350    pub const ENCODED_LEN: usize = 133usize;
32351    pub const DEFAULT: Self = Self {
32352        payload_type: MavTunnelPayloadType::DEFAULT,
32353        target_system: 0_u8,
32354        target_component: 0_u8,
32355        payload_length: 0_u8,
32356        payload: [0_u8; 128usize],
32357    };
32358    #[cfg(feature = "arbitrary")]
32359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32360        use arbitrary::{Arbitrary, Unstructured};
32361        let mut buf = [0u8; 1024];
32362        rng.fill_bytes(&mut buf);
32363        let mut unstructured = Unstructured::new(&buf);
32364        Self::arbitrary(&mut unstructured).unwrap_or_default()
32365    }
32366}
32367impl Default for TUNNEL_DATA {
32368    fn default() -> Self {
32369        Self::DEFAULT.clone()
32370    }
32371}
32372impl MessageData for TUNNEL_DATA {
32373    type Message = MavMessage;
32374    const ID: u32 = 385u32;
32375    const NAME: &'static str = "TUNNEL";
32376    const EXTRA_CRC: u8 = 147u8;
32377    const ENCODED_LEN: usize = 133usize;
32378    fn deser(
32379        _version: MavlinkVersion,
32380        __input: &[u8],
32381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32382        let avail_len = __input.len();
32383        let mut payload_buf = [0; Self::ENCODED_LEN];
32384        let mut buf = if avail_len < Self::ENCODED_LEN {
32385            payload_buf[0..avail_len].copy_from_slice(__input);
32386            Bytes::new(&payload_buf)
32387        } else {
32388            Bytes::new(__input)
32389        };
32390        let mut __struct = Self::default();
32391        let tmp = buf.get_u16_le();
32392        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32393            ::mavlink_core::error::ParserError::InvalidEnum {
32394                enum_type: "MavTunnelPayloadType",
32395                value: tmp as u64,
32396            },
32397        )?;
32398        __struct.target_system = buf.get_u8();
32399        __struct.target_component = buf.get_u8();
32400        __struct.payload_length = buf.get_u8();
32401        for v in &mut __struct.payload {
32402            let val = buf.get_u8();
32403            *v = val;
32404        }
32405        Ok(__struct)
32406    }
32407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32408        let mut __tmp = BytesMut::new(bytes);
32409        #[allow(clippy::absurd_extreme_comparisons)]
32410        #[allow(unused_comparisons)]
32411        if __tmp.remaining() < Self::ENCODED_LEN {
32412            panic!(
32413                "buffer is too small (need {} bytes, but got {})",
32414                Self::ENCODED_LEN,
32415                __tmp.remaining(),
32416            )
32417        }
32418        __tmp.put_u16_le(self.payload_type as u16);
32419        __tmp.put_u8(self.target_system);
32420        __tmp.put_u8(self.target_component);
32421        __tmp.put_u8(self.payload_length);
32422        for val in &self.payload {
32423            __tmp.put_u8(*val);
32424        }
32425        if matches!(version, MavlinkVersion::V2) {
32426            let len = __tmp.len();
32427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32428        } else {
32429            __tmp.len()
32430        }
32431    }
32432}
32433#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32434#[doc = ""]
32435#[doc = "ID: 311"]
32436#[derive(Debug, Clone, PartialEq)]
32437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32439#[cfg_attr(feature = "ts", derive(TS))]
32440#[cfg_attr(feature = "ts", ts(export))]
32441pub struct UAVCAN_NODE_INFO_DATA {
32442    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32443    pub time_usec: u64,
32444    #[doc = "Time since the start-up of the node."]
32445    pub uptime_sec: u32,
32446    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32447    pub sw_vcs_commit: u32,
32448    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32449    #[cfg_attr(feature = "ts", ts(type = "string"))]
32450    pub name: CharArray<80>,
32451    #[doc = "Hardware major version number."]
32452    pub hw_version_major: u8,
32453    #[doc = "Hardware minor version number."]
32454    pub hw_version_minor: u8,
32455    #[doc = "Hardware unique 128-bit ID."]
32456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32458    pub hw_unique_id: [u8; 16],
32459    #[doc = "Software major version number."]
32460    pub sw_version_major: u8,
32461    #[doc = "Software minor version number."]
32462    pub sw_version_minor: u8,
32463}
32464impl UAVCAN_NODE_INFO_DATA {
32465    pub const ENCODED_LEN: usize = 116usize;
32466    pub const DEFAULT: Self = Self {
32467        time_usec: 0_u64,
32468        uptime_sec: 0_u32,
32469        sw_vcs_commit: 0_u32,
32470        name: CharArray::new([0_u8; 80usize]),
32471        hw_version_major: 0_u8,
32472        hw_version_minor: 0_u8,
32473        hw_unique_id: [0_u8; 16usize],
32474        sw_version_major: 0_u8,
32475        sw_version_minor: 0_u8,
32476    };
32477    #[cfg(feature = "arbitrary")]
32478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32479        use arbitrary::{Arbitrary, Unstructured};
32480        let mut buf = [0u8; 1024];
32481        rng.fill_bytes(&mut buf);
32482        let mut unstructured = Unstructured::new(&buf);
32483        Self::arbitrary(&mut unstructured).unwrap_or_default()
32484    }
32485}
32486impl Default for UAVCAN_NODE_INFO_DATA {
32487    fn default() -> Self {
32488        Self::DEFAULT.clone()
32489    }
32490}
32491impl MessageData for UAVCAN_NODE_INFO_DATA {
32492    type Message = MavMessage;
32493    const ID: u32 = 311u32;
32494    const NAME: &'static str = "UAVCAN_NODE_INFO";
32495    const EXTRA_CRC: u8 = 95u8;
32496    const ENCODED_LEN: usize = 116usize;
32497    fn deser(
32498        _version: MavlinkVersion,
32499        __input: &[u8],
32500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32501        let avail_len = __input.len();
32502        let mut payload_buf = [0; Self::ENCODED_LEN];
32503        let mut buf = if avail_len < Self::ENCODED_LEN {
32504            payload_buf[0..avail_len].copy_from_slice(__input);
32505            Bytes::new(&payload_buf)
32506        } else {
32507            Bytes::new(__input)
32508        };
32509        let mut __struct = Self::default();
32510        __struct.time_usec = buf.get_u64_le();
32511        __struct.uptime_sec = buf.get_u32_le();
32512        __struct.sw_vcs_commit = buf.get_u32_le();
32513        let mut tmp = [0_u8; 80usize];
32514        for v in &mut tmp {
32515            *v = buf.get_u8();
32516        }
32517        __struct.name = CharArray::new(tmp);
32518        __struct.hw_version_major = buf.get_u8();
32519        __struct.hw_version_minor = buf.get_u8();
32520        for v in &mut __struct.hw_unique_id {
32521            let val = buf.get_u8();
32522            *v = val;
32523        }
32524        __struct.sw_version_major = buf.get_u8();
32525        __struct.sw_version_minor = buf.get_u8();
32526        Ok(__struct)
32527    }
32528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32529        let mut __tmp = BytesMut::new(bytes);
32530        #[allow(clippy::absurd_extreme_comparisons)]
32531        #[allow(unused_comparisons)]
32532        if __tmp.remaining() < Self::ENCODED_LEN {
32533            panic!(
32534                "buffer is too small (need {} bytes, but got {})",
32535                Self::ENCODED_LEN,
32536                __tmp.remaining(),
32537            )
32538        }
32539        __tmp.put_u64_le(self.time_usec);
32540        __tmp.put_u32_le(self.uptime_sec);
32541        __tmp.put_u32_le(self.sw_vcs_commit);
32542        for val in &self.name {
32543            __tmp.put_u8(*val);
32544        }
32545        __tmp.put_u8(self.hw_version_major);
32546        __tmp.put_u8(self.hw_version_minor);
32547        for val in &self.hw_unique_id {
32548            __tmp.put_u8(*val);
32549        }
32550        __tmp.put_u8(self.sw_version_major);
32551        __tmp.put_u8(self.sw_version_minor);
32552        if matches!(version, MavlinkVersion::V2) {
32553            let len = __tmp.len();
32554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32555        } else {
32556            __tmp.len()
32557        }
32558    }
32559}
32560#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32561#[doc = ""]
32562#[doc = "ID: 310"]
32563#[derive(Debug, Clone, PartialEq)]
32564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32566#[cfg_attr(feature = "ts", derive(TS))]
32567#[cfg_attr(feature = "ts", ts(export))]
32568pub struct UAVCAN_NODE_STATUS_DATA {
32569    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32570    pub time_usec: u64,
32571    #[doc = "Time since the start-up of the node."]
32572    pub uptime_sec: u32,
32573    #[doc = "Vendor-specific status information."]
32574    pub vendor_specific_status_code: u16,
32575    #[doc = "Generalized node health status."]
32576    pub health: UavcanNodeHealth,
32577    #[doc = "Generalized operating mode."]
32578    pub mode: UavcanNodeMode,
32579    #[doc = "Not used currently."]
32580    pub sub_mode: u8,
32581}
32582impl UAVCAN_NODE_STATUS_DATA {
32583    pub const ENCODED_LEN: usize = 17usize;
32584    pub const DEFAULT: Self = Self {
32585        time_usec: 0_u64,
32586        uptime_sec: 0_u32,
32587        vendor_specific_status_code: 0_u16,
32588        health: UavcanNodeHealth::DEFAULT,
32589        mode: UavcanNodeMode::DEFAULT,
32590        sub_mode: 0_u8,
32591    };
32592    #[cfg(feature = "arbitrary")]
32593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32594        use arbitrary::{Arbitrary, Unstructured};
32595        let mut buf = [0u8; 1024];
32596        rng.fill_bytes(&mut buf);
32597        let mut unstructured = Unstructured::new(&buf);
32598        Self::arbitrary(&mut unstructured).unwrap_or_default()
32599    }
32600}
32601impl Default for UAVCAN_NODE_STATUS_DATA {
32602    fn default() -> Self {
32603        Self::DEFAULT.clone()
32604    }
32605}
32606impl MessageData for UAVCAN_NODE_STATUS_DATA {
32607    type Message = MavMessage;
32608    const ID: u32 = 310u32;
32609    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32610    const EXTRA_CRC: u8 = 28u8;
32611    const ENCODED_LEN: usize = 17usize;
32612    fn deser(
32613        _version: MavlinkVersion,
32614        __input: &[u8],
32615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32616        let avail_len = __input.len();
32617        let mut payload_buf = [0; Self::ENCODED_LEN];
32618        let mut buf = if avail_len < Self::ENCODED_LEN {
32619            payload_buf[0..avail_len].copy_from_slice(__input);
32620            Bytes::new(&payload_buf)
32621        } else {
32622            Bytes::new(__input)
32623        };
32624        let mut __struct = Self::default();
32625        __struct.time_usec = buf.get_u64_le();
32626        __struct.uptime_sec = buf.get_u32_le();
32627        __struct.vendor_specific_status_code = buf.get_u16_le();
32628        let tmp = buf.get_u8();
32629        __struct.health =
32630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32631                enum_type: "UavcanNodeHealth",
32632                value: tmp as u64,
32633            })?;
32634        let tmp = buf.get_u8();
32635        __struct.mode =
32636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32637                enum_type: "UavcanNodeMode",
32638                value: tmp as u64,
32639            })?;
32640        __struct.sub_mode = buf.get_u8();
32641        Ok(__struct)
32642    }
32643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32644        let mut __tmp = BytesMut::new(bytes);
32645        #[allow(clippy::absurd_extreme_comparisons)]
32646        #[allow(unused_comparisons)]
32647        if __tmp.remaining() < Self::ENCODED_LEN {
32648            panic!(
32649                "buffer is too small (need {} bytes, but got {})",
32650                Self::ENCODED_LEN,
32651                __tmp.remaining(),
32652            )
32653        }
32654        __tmp.put_u64_le(self.time_usec);
32655        __tmp.put_u32_le(self.uptime_sec);
32656        __tmp.put_u16_le(self.vendor_specific_status_code);
32657        __tmp.put_u8(self.health as u8);
32658        __tmp.put_u8(self.mode as u8);
32659        __tmp.put_u8(self.sub_mode);
32660        if matches!(version, MavlinkVersion::V2) {
32661            let len = __tmp.len();
32662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32663        } else {
32664            __tmp.len()
32665        }
32666    }
32667}
32668#[doc = "The global position resulting from GPS and sensor fusion."]
32669#[doc = ""]
32670#[doc = "ID: 340"]
32671#[derive(Debug, Clone, PartialEq)]
32672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32674#[cfg_attr(feature = "ts", derive(TS))]
32675#[cfg_attr(feature = "ts", ts(export))]
32676pub struct UTM_GLOBAL_POSITION_DATA {
32677    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32678    pub time: u64,
32679    #[doc = "Latitude (WGS84)"]
32680    pub lat: i32,
32681    #[doc = "Longitude (WGS84)"]
32682    pub lon: i32,
32683    #[doc = "Altitude (WGS84)"]
32684    pub alt: i32,
32685    #[doc = "Altitude above ground"]
32686    pub relative_alt: i32,
32687    #[doc = "Next waypoint, latitude (WGS84)"]
32688    pub next_lat: i32,
32689    #[doc = "Next waypoint, longitude (WGS84)"]
32690    pub next_lon: i32,
32691    #[doc = "Next waypoint, altitude (WGS84)"]
32692    pub next_alt: i32,
32693    #[doc = "Ground X speed (latitude, positive north)"]
32694    pub vx: i16,
32695    #[doc = "Ground Y speed (longitude, positive east)"]
32696    pub vy: i16,
32697    #[doc = "Ground Z speed (altitude, positive down)"]
32698    pub vz: i16,
32699    #[doc = "Horizontal position uncertainty (standard deviation)"]
32700    pub h_acc: u16,
32701    #[doc = "Altitude uncertainty (standard deviation)"]
32702    pub v_acc: u16,
32703    #[doc = "Speed uncertainty (standard deviation)"]
32704    pub vel_acc: u16,
32705    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32706    pub update_rate: u16,
32707    #[doc = "Unique UAS ID."]
32708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32710    pub uas_id: [u8; 18],
32711    #[doc = "Flight state"]
32712    pub flight_state: UtmFlightState,
32713    #[doc = "Bitwise OR combination of the data available flags."]
32714    pub flags: UtmDataAvailFlags,
32715}
32716impl UTM_GLOBAL_POSITION_DATA {
32717    pub const ENCODED_LEN: usize = 70usize;
32718    pub const DEFAULT: Self = Self {
32719        time: 0_u64,
32720        lat: 0_i32,
32721        lon: 0_i32,
32722        alt: 0_i32,
32723        relative_alt: 0_i32,
32724        next_lat: 0_i32,
32725        next_lon: 0_i32,
32726        next_alt: 0_i32,
32727        vx: 0_i16,
32728        vy: 0_i16,
32729        vz: 0_i16,
32730        h_acc: 0_u16,
32731        v_acc: 0_u16,
32732        vel_acc: 0_u16,
32733        update_rate: 0_u16,
32734        uas_id: [0_u8; 18usize],
32735        flight_state: UtmFlightState::DEFAULT,
32736        flags: UtmDataAvailFlags::DEFAULT,
32737    };
32738    #[cfg(feature = "arbitrary")]
32739    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32740        use arbitrary::{Arbitrary, Unstructured};
32741        let mut buf = [0u8; 1024];
32742        rng.fill_bytes(&mut buf);
32743        let mut unstructured = Unstructured::new(&buf);
32744        Self::arbitrary(&mut unstructured).unwrap_or_default()
32745    }
32746}
32747impl Default for UTM_GLOBAL_POSITION_DATA {
32748    fn default() -> Self {
32749        Self::DEFAULT.clone()
32750    }
32751}
32752impl MessageData for UTM_GLOBAL_POSITION_DATA {
32753    type Message = MavMessage;
32754    const ID: u32 = 340u32;
32755    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32756    const EXTRA_CRC: u8 = 99u8;
32757    const ENCODED_LEN: usize = 70usize;
32758    fn deser(
32759        _version: MavlinkVersion,
32760        __input: &[u8],
32761    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32762        let avail_len = __input.len();
32763        let mut payload_buf = [0; Self::ENCODED_LEN];
32764        let mut buf = if avail_len < Self::ENCODED_LEN {
32765            payload_buf[0..avail_len].copy_from_slice(__input);
32766            Bytes::new(&payload_buf)
32767        } else {
32768            Bytes::new(__input)
32769        };
32770        let mut __struct = Self::default();
32771        __struct.time = buf.get_u64_le();
32772        __struct.lat = buf.get_i32_le();
32773        __struct.lon = buf.get_i32_le();
32774        __struct.alt = buf.get_i32_le();
32775        __struct.relative_alt = buf.get_i32_le();
32776        __struct.next_lat = buf.get_i32_le();
32777        __struct.next_lon = buf.get_i32_le();
32778        __struct.next_alt = buf.get_i32_le();
32779        __struct.vx = buf.get_i16_le();
32780        __struct.vy = buf.get_i16_le();
32781        __struct.vz = buf.get_i16_le();
32782        __struct.h_acc = buf.get_u16_le();
32783        __struct.v_acc = buf.get_u16_le();
32784        __struct.vel_acc = buf.get_u16_le();
32785        __struct.update_rate = buf.get_u16_le();
32786        for v in &mut __struct.uas_id {
32787            let val = buf.get_u8();
32788            *v = val;
32789        }
32790        let tmp = buf.get_u8();
32791        __struct.flight_state =
32792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32793                enum_type: "UtmFlightState",
32794                value: tmp as u64,
32795            })?;
32796        let tmp = buf.get_u8();
32797        __struct.flags = UtmDataAvailFlags::from_bits(tmp).ok_or(
32798            ::mavlink_core::error::ParserError::InvalidFlag {
32799                flag_type: "UtmDataAvailFlags",
32800                value: tmp as u64,
32801            },
32802        )?;
32803        Ok(__struct)
32804    }
32805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32806        let mut __tmp = BytesMut::new(bytes);
32807        #[allow(clippy::absurd_extreme_comparisons)]
32808        #[allow(unused_comparisons)]
32809        if __tmp.remaining() < Self::ENCODED_LEN {
32810            panic!(
32811                "buffer is too small (need {} bytes, but got {})",
32812                Self::ENCODED_LEN,
32813                __tmp.remaining(),
32814            )
32815        }
32816        __tmp.put_u64_le(self.time);
32817        __tmp.put_i32_le(self.lat);
32818        __tmp.put_i32_le(self.lon);
32819        __tmp.put_i32_le(self.alt);
32820        __tmp.put_i32_le(self.relative_alt);
32821        __tmp.put_i32_le(self.next_lat);
32822        __tmp.put_i32_le(self.next_lon);
32823        __tmp.put_i32_le(self.next_alt);
32824        __tmp.put_i16_le(self.vx);
32825        __tmp.put_i16_le(self.vy);
32826        __tmp.put_i16_le(self.vz);
32827        __tmp.put_u16_le(self.h_acc);
32828        __tmp.put_u16_le(self.v_acc);
32829        __tmp.put_u16_le(self.vel_acc);
32830        __tmp.put_u16_le(self.update_rate);
32831        for val in &self.uas_id {
32832            __tmp.put_u8(*val);
32833        }
32834        __tmp.put_u8(self.flight_state as u8);
32835        __tmp.put_u8(self.flags.bits());
32836        if matches!(version, MavlinkVersion::V2) {
32837            let len = __tmp.len();
32838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32839        } else {
32840            __tmp.len()
32841        }
32842    }
32843}
32844#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32845#[doc = ""]
32846#[doc = "ID: 248"]
32847#[derive(Debug, Clone, PartialEq)]
32848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32850#[cfg_attr(feature = "ts", derive(TS))]
32851#[cfg_attr(feature = "ts", ts(export))]
32852pub struct V2_EXTENSION_DATA {
32853    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32854    pub message_type: u16,
32855    #[doc = "Network ID (0 for broadcast)"]
32856    pub target_network: u8,
32857    #[doc = "System ID (0 for broadcast)"]
32858    pub target_system: u8,
32859    #[doc = "Component ID (0 for broadcast)"]
32860    pub target_component: u8,
32861    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32864    pub payload: [u8; 249],
32865}
32866impl V2_EXTENSION_DATA {
32867    pub const ENCODED_LEN: usize = 254usize;
32868    pub const DEFAULT: Self = Self {
32869        message_type: 0_u16,
32870        target_network: 0_u8,
32871        target_system: 0_u8,
32872        target_component: 0_u8,
32873        payload: [0_u8; 249usize],
32874    };
32875    #[cfg(feature = "arbitrary")]
32876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32877        use arbitrary::{Arbitrary, Unstructured};
32878        let mut buf = [0u8; 1024];
32879        rng.fill_bytes(&mut buf);
32880        let mut unstructured = Unstructured::new(&buf);
32881        Self::arbitrary(&mut unstructured).unwrap_or_default()
32882    }
32883}
32884impl Default for V2_EXTENSION_DATA {
32885    fn default() -> Self {
32886        Self::DEFAULT.clone()
32887    }
32888}
32889impl MessageData for V2_EXTENSION_DATA {
32890    type Message = MavMessage;
32891    const ID: u32 = 248u32;
32892    const NAME: &'static str = "V2_EXTENSION";
32893    const EXTRA_CRC: u8 = 8u8;
32894    const ENCODED_LEN: usize = 254usize;
32895    fn deser(
32896        _version: MavlinkVersion,
32897        __input: &[u8],
32898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32899        let avail_len = __input.len();
32900        let mut payload_buf = [0; Self::ENCODED_LEN];
32901        let mut buf = if avail_len < Self::ENCODED_LEN {
32902            payload_buf[0..avail_len].copy_from_slice(__input);
32903            Bytes::new(&payload_buf)
32904        } else {
32905            Bytes::new(__input)
32906        };
32907        let mut __struct = Self::default();
32908        __struct.message_type = buf.get_u16_le();
32909        __struct.target_network = buf.get_u8();
32910        __struct.target_system = buf.get_u8();
32911        __struct.target_component = buf.get_u8();
32912        for v in &mut __struct.payload {
32913            let val = buf.get_u8();
32914            *v = val;
32915        }
32916        Ok(__struct)
32917    }
32918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32919        let mut __tmp = BytesMut::new(bytes);
32920        #[allow(clippy::absurd_extreme_comparisons)]
32921        #[allow(unused_comparisons)]
32922        if __tmp.remaining() < Self::ENCODED_LEN {
32923            panic!(
32924                "buffer is too small (need {} bytes, but got {})",
32925                Self::ENCODED_LEN,
32926                __tmp.remaining(),
32927            )
32928        }
32929        __tmp.put_u16_le(self.message_type);
32930        __tmp.put_u8(self.target_network);
32931        __tmp.put_u8(self.target_system);
32932        __tmp.put_u8(self.target_component);
32933        for val in &self.payload {
32934            __tmp.put_u8(*val);
32935        }
32936        if matches!(version, MavlinkVersion::V2) {
32937            let len = __tmp.len();
32938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32939        } else {
32940            __tmp.len()
32941        }
32942    }
32943}
32944#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32945#[doc = ""]
32946#[doc = "ID: 74"]
32947#[derive(Debug, Clone, PartialEq)]
32948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32950#[cfg_attr(feature = "ts", derive(TS))]
32951#[cfg_attr(feature = "ts", ts(export))]
32952pub struct VFR_HUD_DATA {
32953    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32954    pub airspeed: f32,
32955    #[doc = "Current ground speed."]
32956    pub groundspeed: f32,
32957    #[doc = "Current altitude (MSL)."]
32958    pub alt: f32,
32959    #[doc = "Current climb rate."]
32960    pub climb: f32,
32961    #[doc = "Current heading in compass units (0-360, 0=north)."]
32962    pub heading: i16,
32963    #[doc = "Current throttle setting (0 to 100)."]
32964    pub throttle: u16,
32965}
32966impl VFR_HUD_DATA {
32967    pub const ENCODED_LEN: usize = 20usize;
32968    pub const DEFAULT: Self = Self {
32969        airspeed: 0.0_f32,
32970        groundspeed: 0.0_f32,
32971        alt: 0.0_f32,
32972        climb: 0.0_f32,
32973        heading: 0_i16,
32974        throttle: 0_u16,
32975    };
32976    #[cfg(feature = "arbitrary")]
32977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32978        use arbitrary::{Arbitrary, Unstructured};
32979        let mut buf = [0u8; 1024];
32980        rng.fill_bytes(&mut buf);
32981        let mut unstructured = Unstructured::new(&buf);
32982        Self::arbitrary(&mut unstructured).unwrap_or_default()
32983    }
32984}
32985impl Default for VFR_HUD_DATA {
32986    fn default() -> Self {
32987        Self::DEFAULT.clone()
32988    }
32989}
32990impl MessageData for VFR_HUD_DATA {
32991    type Message = MavMessage;
32992    const ID: u32 = 74u32;
32993    const NAME: &'static str = "VFR_HUD";
32994    const EXTRA_CRC: u8 = 20u8;
32995    const ENCODED_LEN: usize = 20usize;
32996    fn deser(
32997        _version: MavlinkVersion,
32998        __input: &[u8],
32999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33000        let avail_len = __input.len();
33001        let mut payload_buf = [0; Self::ENCODED_LEN];
33002        let mut buf = if avail_len < Self::ENCODED_LEN {
33003            payload_buf[0..avail_len].copy_from_slice(__input);
33004            Bytes::new(&payload_buf)
33005        } else {
33006            Bytes::new(__input)
33007        };
33008        let mut __struct = Self::default();
33009        __struct.airspeed = buf.get_f32_le();
33010        __struct.groundspeed = buf.get_f32_le();
33011        __struct.alt = buf.get_f32_le();
33012        __struct.climb = buf.get_f32_le();
33013        __struct.heading = buf.get_i16_le();
33014        __struct.throttle = buf.get_u16_le();
33015        Ok(__struct)
33016    }
33017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33018        let mut __tmp = BytesMut::new(bytes);
33019        #[allow(clippy::absurd_extreme_comparisons)]
33020        #[allow(unused_comparisons)]
33021        if __tmp.remaining() < Self::ENCODED_LEN {
33022            panic!(
33023                "buffer is too small (need {} bytes, but got {})",
33024                Self::ENCODED_LEN,
33025                __tmp.remaining(),
33026            )
33027        }
33028        __tmp.put_f32_le(self.airspeed);
33029        __tmp.put_f32_le(self.groundspeed);
33030        __tmp.put_f32_le(self.alt);
33031        __tmp.put_f32_le(self.climb);
33032        __tmp.put_i16_le(self.heading);
33033        __tmp.put_u16_le(self.throttle);
33034        if matches!(version, MavlinkVersion::V2) {
33035            let len = __tmp.len();
33036            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33037        } else {
33038            __tmp.len()
33039        }
33040    }
33041}
33042#[doc = "Vibration levels and accelerometer clipping."]
33043#[doc = ""]
33044#[doc = "ID: 241"]
33045#[derive(Debug, Clone, PartialEq)]
33046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33048#[cfg_attr(feature = "ts", derive(TS))]
33049#[cfg_attr(feature = "ts", ts(export))]
33050pub struct VIBRATION_DATA {
33051    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33052    pub time_usec: u64,
33053    #[doc = "Vibration levels on X-axis"]
33054    pub vibration_x: f32,
33055    #[doc = "Vibration levels on Y-axis"]
33056    pub vibration_y: f32,
33057    #[doc = "Vibration levels on Z-axis"]
33058    pub vibration_z: f32,
33059    #[doc = "first accelerometer clipping count"]
33060    pub clipping_0: u32,
33061    #[doc = "second accelerometer clipping count"]
33062    pub clipping_1: u32,
33063    #[doc = "third accelerometer clipping count"]
33064    pub clipping_2: u32,
33065}
33066impl VIBRATION_DATA {
33067    pub const ENCODED_LEN: usize = 32usize;
33068    pub const DEFAULT: Self = Self {
33069        time_usec: 0_u64,
33070        vibration_x: 0.0_f32,
33071        vibration_y: 0.0_f32,
33072        vibration_z: 0.0_f32,
33073        clipping_0: 0_u32,
33074        clipping_1: 0_u32,
33075        clipping_2: 0_u32,
33076    };
33077    #[cfg(feature = "arbitrary")]
33078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33079        use arbitrary::{Arbitrary, Unstructured};
33080        let mut buf = [0u8; 1024];
33081        rng.fill_bytes(&mut buf);
33082        let mut unstructured = Unstructured::new(&buf);
33083        Self::arbitrary(&mut unstructured).unwrap_or_default()
33084    }
33085}
33086impl Default for VIBRATION_DATA {
33087    fn default() -> Self {
33088        Self::DEFAULT.clone()
33089    }
33090}
33091impl MessageData for VIBRATION_DATA {
33092    type Message = MavMessage;
33093    const ID: u32 = 241u32;
33094    const NAME: &'static str = "VIBRATION";
33095    const EXTRA_CRC: u8 = 90u8;
33096    const ENCODED_LEN: usize = 32usize;
33097    fn deser(
33098        _version: MavlinkVersion,
33099        __input: &[u8],
33100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33101        let avail_len = __input.len();
33102        let mut payload_buf = [0; Self::ENCODED_LEN];
33103        let mut buf = if avail_len < Self::ENCODED_LEN {
33104            payload_buf[0..avail_len].copy_from_slice(__input);
33105            Bytes::new(&payload_buf)
33106        } else {
33107            Bytes::new(__input)
33108        };
33109        let mut __struct = Self::default();
33110        __struct.time_usec = buf.get_u64_le();
33111        __struct.vibration_x = buf.get_f32_le();
33112        __struct.vibration_y = buf.get_f32_le();
33113        __struct.vibration_z = buf.get_f32_le();
33114        __struct.clipping_0 = buf.get_u32_le();
33115        __struct.clipping_1 = buf.get_u32_le();
33116        __struct.clipping_2 = buf.get_u32_le();
33117        Ok(__struct)
33118    }
33119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33120        let mut __tmp = BytesMut::new(bytes);
33121        #[allow(clippy::absurd_extreme_comparisons)]
33122        #[allow(unused_comparisons)]
33123        if __tmp.remaining() < Self::ENCODED_LEN {
33124            panic!(
33125                "buffer is too small (need {} bytes, but got {})",
33126                Self::ENCODED_LEN,
33127                __tmp.remaining(),
33128            )
33129        }
33130        __tmp.put_u64_le(self.time_usec);
33131        __tmp.put_f32_le(self.vibration_x);
33132        __tmp.put_f32_le(self.vibration_y);
33133        __tmp.put_f32_le(self.vibration_z);
33134        __tmp.put_u32_le(self.clipping_0);
33135        __tmp.put_u32_le(self.clipping_1);
33136        __tmp.put_u32_le(self.clipping_2);
33137        if matches!(version, MavlinkVersion::V2) {
33138            let len = __tmp.len();
33139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33140        } else {
33141            __tmp.len()
33142        }
33143    }
33144}
33145#[doc = "Global position estimate from a Vicon motion system source."]
33146#[doc = ""]
33147#[doc = "ID: 104"]
33148#[derive(Debug, Clone, PartialEq)]
33149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33151#[cfg_attr(feature = "ts", derive(TS))]
33152#[cfg_attr(feature = "ts", ts(export))]
33153pub struct VICON_POSITION_ESTIMATE_DATA {
33154    #[doc = "Timestamp (UNIX time or time since system boot)"]
33155    pub usec: u64,
33156    #[doc = "Global X position"]
33157    pub x: f32,
33158    #[doc = "Global Y position"]
33159    pub y: f32,
33160    #[doc = "Global Z position"]
33161    pub z: f32,
33162    #[doc = "Roll angle"]
33163    pub roll: f32,
33164    #[doc = "Pitch angle"]
33165    pub pitch: f32,
33166    #[doc = "Yaw angle"]
33167    pub yaw: f32,
33168    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33169    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33172    pub covariance: [f32; 21],
33173}
33174impl VICON_POSITION_ESTIMATE_DATA {
33175    pub const ENCODED_LEN: usize = 116usize;
33176    pub const DEFAULT: Self = Self {
33177        usec: 0_u64,
33178        x: 0.0_f32,
33179        y: 0.0_f32,
33180        z: 0.0_f32,
33181        roll: 0.0_f32,
33182        pitch: 0.0_f32,
33183        yaw: 0.0_f32,
33184        covariance: [0.0_f32; 21usize],
33185    };
33186    #[cfg(feature = "arbitrary")]
33187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33188        use arbitrary::{Arbitrary, Unstructured};
33189        let mut buf = [0u8; 1024];
33190        rng.fill_bytes(&mut buf);
33191        let mut unstructured = Unstructured::new(&buf);
33192        Self::arbitrary(&mut unstructured).unwrap_or_default()
33193    }
33194}
33195impl Default for VICON_POSITION_ESTIMATE_DATA {
33196    fn default() -> Self {
33197        Self::DEFAULT.clone()
33198    }
33199}
33200impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33201    type Message = MavMessage;
33202    const ID: u32 = 104u32;
33203    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33204    const EXTRA_CRC: u8 = 56u8;
33205    const ENCODED_LEN: usize = 116usize;
33206    fn deser(
33207        _version: MavlinkVersion,
33208        __input: &[u8],
33209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33210        let avail_len = __input.len();
33211        let mut payload_buf = [0; Self::ENCODED_LEN];
33212        let mut buf = if avail_len < Self::ENCODED_LEN {
33213            payload_buf[0..avail_len].copy_from_slice(__input);
33214            Bytes::new(&payload_buf)
33215        } else {
33216            Bytes::new(__input)
33217        };
33218        let mut __struct = Self::default();
33219        __struct.usec = buf.get_u64_le();
33220        __struct.x = buf.get_f32_le();
33221        __struct.y = buf.get_f32_le();
33222        __struct.z = buf.get_f32_le();
33223        __struct.roll = buf.get_f32_le();
33224        __struct.pitch = buf.get_f32_le();
33225        __struct.yaw = buf.get_f32_le();
33226        for v in &mut __struct.covariance {
33227            let val = buf.get_f32_le();
33228            *v = val;
33229        }
33230        Ok(__struct)
33231    }
33232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33233        let mut __tmp = BytesMut::new(bytes);
33234        #[allow(clippy::absurd_extreme_comparisons)]
33235        #[allow(unused_comparisons)]
33236        if __tmp.remaining() < Self::ENCODED_LEN {
33237            panic!(
33238                "buffer is too small (need {} bytes, but got {})",
33239                Self::ENCODED_LEN,
33240                __tmp.remaining(),
33241            )
33242        }
33243        __tmp.put_u64_le(self.usec);
33244        __tmp.put_f32_le(self.x);
33245        __tmp.put_f32_le(self.y);
33246        __tmp.put_f32_le(self.z);
33247        __tmp.put_f32_le(self.roll);
33248        __tmp.put_f32_le(self.pitch);
33249        __tmp.put_f32_le(self.yaw);
33250        if matches!(version, MavlinkVersion::V2) {
33251            for val in &self.covariance {
33252                __tmp.put_f32_le(*val);
33253            }
33254            let len = __tmp.len();
33255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33256        } else {
33257            __tmp.len()
33258        }
33259    }
33260}
33261#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33262#[doc = ""]
33263#[doc = "ID: 269"]
33264#[derive(Debug, Clone, PartialEq)]
33265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33267#[cfg_attr(feature = "ts", derive(TS))]
33268#[cfg_attr(feature = "ts", ts(export))]
33269pub struct VIDEO_STREAM_INFORMATION_DATA {
33270    #[doc = "Frame rate."]
33271    pub framerate: f32,
33272    #[doc = "Bit rate."]
33273    pub bitrate: u32,
33274    #[doc = "Bitmap of stream status flags."]
33275    pub flags: VideoStreamStatusFlags,
33276    #[doc = "Horizontal resolution."]
33277    pub resolution_h: u16,
33278    #[doc = "Vertical resolution."]
33279    pub resolution_v: u16,
33280    #[doc = "Video image rotation clockwise."]
33281    pub rotation: u16,
33282    #[doc = "Horizontal Field of view."]
33283    pub hfov: u16,
33284    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33285    pub stream_id: u8,
33286    #[doc = "Number of streams available."]
33287    pub count: u8,
33288    #[doc = "Type of stream."]
33289    pub mavtype: VideoStreamType,
33290    #[doc = "Stream name."]
33291    #[cfg_attr(feature = "ts", ts(type = "string"))]
33292    pub name: CharArray<32>,
33293    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33294    #[cfg_attr(feature = "ts", ts(type = "string"))]
33295    pub uri: CharArray<160>,
33296    #[doc = "Encoding of stream."]
33297    #[cfg_attr(feature = "serde", serde(default))]
33298    pub encoding: VideoStreamEncoding,
33299    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33301    pub camera_device_id: u8,
33302}
33303impl VIDEO_STREAM_INFORMATION_DATA {
33304    pub const ENCODED_LEN: usize = 215usize;
33305    pub const DEFAULT: Self = Self {
33306        framerate: 0.0_f32,
33307        bitrate: 0_u32,
33308        flags: VideoStreamStatusFlags::DEFAULT,
33309        resolution_h: 0_u16,
33310        resolution_v: 0_u16,
33311        rotation: 0_u16,
33312        hfov: 0_u16,
33313        stream_id: 0_u8,
33314        count: 0_u8,
33315        mavtype: VideoStreamType::DEFAULT,
33316        name: CharArray::new([0_u8; 32usize]),
33317        uri: CharArray::new([0_u8; 160usize]),
33318        encoding: VideoStreamEncoding::DEFAULT,
33319        camera_device_id: 0_u8,
33320    };
33321    #[cfg(feature = "arbitrary")]
33322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33323        use arbitrary::{Arbitrary, Unstructured};
33324        let mut buf = [0u8; 1024];
33325        rng.fill_bytes(&mut buf);
33326        let mut unstructured = Unstructured::new(&buf);
33327        Self::arbitrary(&mut unstructured).unwrap_or_default()
33328    }
33329}
33330impl Default for VIDEO_STREAM_INFORMATION_DATA {
33331    fn default() -> Self {
33332        Self::DEFAULT.clone()
33333    }
33334}
33335impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33336    type Message = MavMessage;
33337    const ID: u32 = 269u32;
33338    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33339    const EXTRA_CRC: u8 = 109u8;
33340    const ENCODED_LEN: usize = 215usize;
33341    fn deser(
33342        _version: MavlinkVersion,
33343        __input: &[u8],
33344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33345        let avail_len = __input.len();
33346        let mut payload_buf = [0; Self::ENCODED_LEN];
33347        let mut buf = if avail_len < Self::ENCODED_LEN {
33348            payload_buf[0..avail_len].copy_from_slice(__input);
33349            Bytes::new(&payload_buf)
33350        } else {
33351            Bytes::new(__input)
33352        };
33353        let mut __struct = Self::default();
33354        __struct.framerate = buf.get_f32_le();
33355        __struct.bitrate = buf.get_u32_le();
33356        let tmp = buf.get_u16_le();
33357        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
33358            ::mavlink_core::error::ParserError::InvalidFlag {
33359                flag_type: "VideoStreamStatusFlags",
33360                value: tmp as u64,
33361            },
33362        )?;
33363        __struct.resolution_h = buf.get_u16_le();
33364        __struct.resolution_v = buf.get_u16_le();
33365        __struct.rotation = buf.get_u16_le();
33366        __struct.hfov = buf.get_u16_le();
33367        __struct.stream_id = buf.get_u8();
33368        __struct.count = buf.get_u8();
33369        let tmp = buf.get_u8();
33370        __struct.mavtype =
33371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33372                enum_type: "VideoStreamType",
33373                value: tmp as u64,
33374            })?;
33375        let mut tmp = [0_u8; 32usize];
33376        for v in &mut tmp {
33377            *v = buf.get_u8();
33378        }
33379        __struct.name = CharArray::new(tmp);
33380        let mut tmp = [0_u8; 160usize];
33381        for v in &mut tmp {
33382            *v = buf.get_u8();
33383        }
33384        __struct.uri = CharArray::new(tmp);
33385        let tmp = buf.get_u8();
33386        __struct.encoding =
33387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33388                enum_type: "VideoStreamEncoding",
33389                value: tmp as u64,
33390            })?;
33391        __struct.camera_device_id = buf.get_u8();
33392        Ok(__struct)
33393    }
33394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33395        let mut __tmp = BytesMut::new(bytes);
33396        #[allow(clippy::absurd_extreme_comparisons)]
33397        #[allow(unused_comparisons)]
33398        if __tmp.remaining() < Self::ENCODED_LEN {
33399            panic!(
33400                "buffer is too small (need {} bytes, but got {})",
33401                Self::ENCODED_LEN,
33402                __tmp.remaining(),
33403            )
33404        }
33405        __tmp.put_f32_le(self.framerate);
33406        __tmp.put_u32_le(self.bitrate);
33407        __tmp.put_u16_le(self.flags.bits());
33408        __tmp.put_u16_le(self.resolution_h);
33409        __tmp.put_u16_le(self.resolution_v);
33410        __tmp.put_u16_le(self.rotation);
33411        __tmp.put_u16_le(self.hfov);
33412        __tmp.put_u8(self.stream_id);
33413        __tmp.put_u8(self.count);
33414        __tmp.put_u8(self.mavtype as u8);
33415        for val in &self.name {
33416            __tmp.put_u8(*val);
33417        }
33418        for val in &self.uri {
33419            __tmp.put_u8(*val);
33420        }
33421        if matches!(version, MavlinkVersion::V2) {
33422            __tmp.put_u8(self.encoding as u8);
33423            __tmp.put_u8(self.camera_device_id);
33424            let len = __tmp.len();
33425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33426        } else {
33427            __tmp.len()
33428        }
33429    }
33430}
33431#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33432#[doc = ""]
33433#[doc = "ID: 270"]
33434#[derive(Debug, Clone, PartialEq)]
33435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33437#[cfg_attr(feature = "ts", derive(TS))]
33438#[cfg_attr(feature = "ts", ts(export))]
33439pub struct VIDEO_STREAM_STATUS_DATA {
33440    #[doc = "Frame rate"]
33441    pub framerate: f32,
33442    #[doc = "Bit rate"]
33443    pub bitrate: u32,
33444    #[doc = "Bitmap of stream status flags"]
33445    pub flags: VideoStreamStatusFlags,
33446    #[doc = "Horizontal resolution"]
33447    pub resolution_h: u16,
33448    #[doc = "Vertical resolution"]
33449    pub resolution_v: u16,
33450    #[doc = "Video image rotation clockwise"]
33451    pub rotation: u16,
33452    #[doc = "Horizontal Field of view"]
33453    pub hfov: u16,
33454    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33455    pub stream_id: u8,
33456    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33458    pub camera_device_id: u8,
33459}
33460impl VIDEO_STREAM_STATUS_DATA {
33461    pub const ENCODED_LEN: usize = 20usize;
33462    pub const DEFAULT: Self = Self {
33463        framerate: 0.0_f32,
33464        bitrate: 0_u32,
33465        flags: VideoStreamStatusFlags::DEFAULT,
33466        resolution_h: 0_u16,
33467        resolution_v: 0_u16,
33468        rotation: 0_u16,
33469        hfov: 0_u16,
33470        stream_id: 0_u8,
33471        camera_device_id: 0_u8,
33472    };
33473    #[cfg(feature = "arbitrary")]
33474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33475        use arbitrary::{Arbitrary, Unstructured};
33476        let mut buf = [0u8; 1024];
33477        rng.fill_bytes(&mut buf);
33478        let mut unstructured = Unstructured::new(&buf);
33479        Self::arbitrary(&mut unstructured).unwrap_or_default()
33480    }
33481}
33482impl Default for VIDEO_STREAM_STATUS_DATA {
33483    fn default() -> Self {
33484        Self::DEFAULT.clone()
33485    }
33486}
33487impl MessageData for VIDEO_STREAM_STATUS_DATA {
33488    type Message = MavMessage;
33489    const ID: u32 = 270u32;
33490    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33491    const EXTRA_CRC: u8 = 59u8;
33492    const ENCODED_LEN: usize = 20usize;
33493    fn deser(
33494        _version: MavlinkVersion,
33495        __input: &[u8],
33496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33497        let avail_len = __input.len();
33498        let mut payload_buf = [0; Self::ENCODED_LEN];
33499        let mut buf = if avail_len < Self::ENCODED_LEN {
33500            payload_buf[0..avail_len].copy_from_slice(__input);
33501            Bytes::new(&payload_buf)
33502        } else {
33503            Bytes::new(__input)
33504        };
33505        let mut __struct = Self::default();
33506        __struct.framerate = buf.get_f32_le();
33507        __struct.bitrate = buf.get_u32_le();
33508        let tmp = buf.get_u16_le();
33509        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
33510            ::mavlink_core::error::ParserError::InvalidFlag {
33511                flag_type: "VideoStreamStatusFlags",
33512                value: tmp as u64,
33513            },
33514        )?;
33515        __struct.resolution_h = buf.get_u16_le();
33516        __struct.resolution_v = buf.get_u16_le();
33517        __struct.rotation = buf.get_u16_le();
33518        __struct.hfov = buf.get_u16_le();
33519        __struct.stream_id = buf.get_u8();
33520        __struct.camera_device_id = buf.get_u8();
33521        Ok(__struct)
33522    }
33523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33524        let mut __tmp = BytesMut::new(bytes);
33525        #[allow(clippy::absurd_extreme_comparisons)]
33526        #[allow(unused_comparisons)]
33527        if __tmp.remaining() < Self::ENCODED_LEN {
33528            panic!(
33529                "buffer is too small (need {} bytes, but got {})",
33530                Self::ENCODED_LEN,
33531                __tmp.remaining(),
33532            )
33533        }
33534        __tmp.put_f32_le(self.framerate);
33535        __tmp.put_u32_le(self.bitrate);
33536        __tmp.put_u16_le(self.flags.bits());
33537        __tmp.put_u16_le(self.resolution_h);
33538        __tmp.put_u16_le(self.resolution_v);
33539        __tmp.put_u16_le(self.rotation);
33540        __tmp.put_u16_le(self.hfov);
33541        __tmp.put_u8(self.stream_id);
33542        if matches!(version, MavlinkVersion::V2) {
33543            __tmp.put_u8(self.camera_device_id);
33544            let len = __tmp.len();
33545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33546        } else {
33547            __tmp.len()
33548        }
33549    }
33550}
33551#[doc = "Local position/attitude estimate from a vision source."]
33552#[doc = ""]
33553#[doc = "ID: 102"]
33554#[derive(Debug, Clone, PartialEq)]
33555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33557#[cfg_attr(feature = "ts", derive(TS))]
33558#[cfg_attr(feature = "ts", ts(export))]
33559pub struct VISION_POSITION_ESTIMATE_DATA {
33560    #[doc = "Timestamp (UNIX time or time since system boot)"]
33561    pub usec: u64,
33562    #[doc = "Local X position"]
33563    pub x: f32,
33564    #[doc = "Local Y position"]
33565    pub y: f32,
33566    #[doc = "Local Z position"]
33567    pub z: f32,
33568    #[doc = "Roll angle"]
33569    pub roll: f32,
33570    #[doc = "Pitch angle"]
33571    pub pitch: f32,
33572    #[doc = "Yaw angle"]
33573    pub yaw: f32,
33574    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33576    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33577    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33578    pub covariance: [f32; 21],
33579    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33580    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33581    pub reset_counter: u8,
33582}
33583impl VISION_POSITION_ESTIMATE_DATA {
33584    pub const ENCODED_LEN: usize = 117usize;
33585    pub const DEFAULT: Self = Self {
33586        usec: 0_u64,
33587        x: 0.0_f32,
33588        y: 0.0_f32,
33589        z: 0.0_f32,
33590        roll: 0.0_f32,
33591        pitch: 0.0_f32,
33592        yaw: 0.0_f32,
33593        covariance: [0.0_f32; 21usize],
33594        reset_counter: 0_u8,
33595    };
33596    #[cfg(feature = "arbitrary")]
33597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33598        use arbitrary::{Arbitrary, Unstructured};
33599        let mut buf = [0u8; 1024];
33600        rng.fill_bytes(&mut buf);
33601        let mut unstructured = Unstructured::new(&buf);
33602        Self::arbitrary(&mut unstructured).unwrap_or_default()
33603    }
33604}
33605impl Default for VISION_POSITION_ESTIMATE_DATA {
33606    fn default() -> Self {
33607        Self::DEFAULT.clone()
33608    }
33609}
33610impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33611    type Message = MavMessage;
33612    const ID: u32 = 102u32;
33613    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33614    const EXTRA_CRC: u8 = 158u8;
33615    const ENCODED_LEN: usize = 117usize;
33616    fn deser(
33617        _version: MavlinkVersion,
33618        __input: &[u8],
33619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33620        let avail_len = __input.len();
33621        let mut payload_buf = [0; Self::ENCODED_LEN];
33622        let mut buf = if avail_len < Self::ENCODED_LEN {
33623            payload_buf[0..avail_len].copy_from_slice(__input);
33624            Bytes::new(&payload_buf)
33625        } else {
33626            Bytes::new(__input)
33627        };
33628        let mut __struct = Self::default();
33629        __struct.usec = buf.get_u64_le();
33630        __struct.x = buf.get_f32_le();
33631        __struct.y = buf.get_f32_le();
33632        __struct.z = buf.get_f32_le();
33633        __struct.roll = buf.get_f32_le();
33634        __struct.pitch = buf.get_f32_le();
33635        __struct.yaw = buf.get_f32_le();
33636        for v in &mut __struct.covariance {
33637            let val = buf.get_f32_le();
33638            *v = val;
33639        }
33640        __struct.reset_counter = buf.get_u8();
33641        Ok(__struct)
33642    }
33643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33644        let mut __tmp = BytesMut::new(bytes);
33645        #[allow(clippy::absurd_extreme_comparisons)]
33646        #[allow(unused_comparisons)]
33647        if __tmp.remaining() < Self::ENCODED_LEN {
33648            panic!(
33649                "buffer is too small (need {} bytes, but got {})",
33650                Self::ENCODED_LEN,
33651                __tmp.remaining(),
33652            )
33653        }
33654        __tmp.put_u64_le(self.usec);
33655        __tmp.put_f32_le(self.x);
33656        __tmp.put_f32_le(self.y);
33657        __tmp.put_f32_le(self.z);
33658        __tmp.put_f32_le(self.roll);
33659        __tmp.put_f32_le(self.pitch);
33660        __tmp.put_f32_le(self.yaw);
33661        if matches!(version, MavlinkVersion::V2) {
33662            for val in &self.covariance {
33663                __tmp.put_f32_le(*val);
33664            }
33665            __tmp.put_u8(self.reset_counter);
33666            let len = __tmp.len();
33667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33668        } else {
33669            __tmp.len()
33670        }
33671    }
33672}
33673#[doc = "Speed estimate from a vision source."]
33674#[doc = ""]
33675#[doc = "ID: 103"]
33676#[derive(Debug, Clone, PartialEq)]
33677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33679#[cfg_attr(feature = "ts", derive(TS))]
33680#[cfg_attr(feature = "ts", ts(export))]
33681pub struct VISION_SPEED_ESTIMATE_DATA {
33682    #[doc = "Timestamp (UNIX time or time since system boot)"]
33683    pub usec: u64,
33684    #[doc = "Global X speed"]
33685    pub x: f32,
33686    #[doc = "Global Y speed"]
33687    pub y: f32,
33688    #[doc = "Global Z speed"]
33689    pub z: f32,
33690    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33692    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33693    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33694    pub covariance: [f32; 9],
33695    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33697    pub reset_counter: u8,
33698}
33699impl VISION_SPEED_ESTIMATE_DATA {
33700    pub const ENCODED_LEN: usize = 57usize;
33701    pub const DEFAULT: Self = Self {
33702        usec: 0_u64,
33703        x: 0.0_f32,
33704        y: 0.0_f32,
33705        z: 0.0_f32,
33706        covariance: [0.0_f32; 9usize],
33707        reset_counter: 0_u8,
33708    };
33709    #[cfg(feature = "arbitrary")]
33710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33711        use arbitrary::{Arbitrary, Unstructured};
33712        let mut buf = [0u8; 1024];
33713        rng.fill_bytes(&mut buf);
33714        let mut unstructured = Unstructured::new(&buf);
33715        Self::arbitrary(&mut unstructured).unwrap_or_default()
33716    }
33717}
33718impl Default for VISION_SPEED_ESTIMATE_DATA {
33719    fn default() -> Self {
33720        Self::DEFAULT.clone()
33721    }
33722}
33723impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33724    type Message = MavMessage;
33725    const ID: u32 = 103u32;
33726    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33727    const EXTRA_CRC: u8 = 208u8;
33728    const ENCODED_LEN: usize = 57usize;
33729    fn deser(
33730        _version: MavlinkVersion,
33731        __input: &[u8],
33732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33733        let avail_len = __input.len();
33734        let mut payload_buf = [0; Self::ENCODED_LEN];
33735        let mut buf = if avail_len < Self::ENCODED_LEN {
33736            payload_buf[0..avail_len].copy_from_slice(__input);
33737            Bytes::new(&payload_buf)
33738        } else {
33739            Bytes::new(__input)
33740        };
33741        let mut __struct = Self::default();
33742        __struct.usec = buf.get_u64_le();
33743        __struct.x = buf.get_f32_le();
33744        __struct.y = buf.get_f32_le();
33745        __struct.z = buf.get_f32_le();
33746        for v in &mut __struct.covariance {
33747            let val = buf.get_f32_le();
33748            *v = val;
33749        }
33750        __struct.reset_counter = buf.get_u8();
33751        Ok(__struct)
33752    }
33753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33754        let mut __tmp = BytesMut::new(bytes);
33755        #[allow(clippy::absurd_extreme_comparisons)]
33756        #[allow(unused_comparisons)]
33757        if __tmp.remaining() < Self::ENCODED_LEN {
33758            panic!(
33759                "buffer is too small (need {} bytes, but got {})",
33760                Self::ENCODED_LEN,
33761                __tmp.remaining(),
33762            )
33763        }
33764        __tmp.put_u64_le(self.usec);
33765        __tmp.put_f32_le(self.x);
33766        __tmp.put_f32_le(self.y);
33767        __tmp.put_f32_le(self.z);
33768        if matches!(version, MavlinkVersion::V2) {
33769            for val in &self.covariance {
33770                __tmp.put_f32_le(*val);
33771            }
33772            __tmp.put_u8(self.reset_counter);
33773            let len = __tmp.len();
33774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33775        } else {
33776            __tmp.len()
33777        }
33778    }
33779}
33780#[doc = "Cumulative distance traveled for each reported wheel."]
33781#[doc = ""]
33782#[doc = "ID: 9000"]
33783#[derive(Debug, Clone, PartialEq)]
33784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33786#[cfg_attr(feature = "ts", derive(TS))]
33787#[cfg_attr(feature = "ts", ts(export))]
33788pub struct WHEEL_DISTANCE_DATA {
33789    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33790    pub time_usec: u64,
33791    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33792    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33793    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33794    pub distance: [f64; 16],
33795    #[doc = "Number of wheels reported."]
33796    pub count: u8,
33797}
33798impl WHEEL_DISTANCE_DATA {
33799    pub const ENCODED_LEN: usize = 137usize;
33800    pub const DEFAULT: Self = Self {
33801        time_usec: 0_u64,
33802        distance: [0.0_f64; 16usize],
33803        count: 0_u8,
33804    };
33805    #[cfg(feature = "arbitrary")]
33806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33807        use arbitrary::{Arbitrary, Unstructured};
33808        let mut buf = [0u8; 1024];
33809        rng.fill_bytes(&mut buf);
33810        let mut unstructured = Unstructured::new(&buf);
33811        Self::arbitrary(&mut unstructured).unwrap_or_default()
33812    }
33813}
33814impl Default for WHEEL_DISTANCE_DATA {
33815    fn default() -> Self {
33816        Self::DEFAULT.clone()
33817    }
33818}
33819impl MessageData for WHEEL_DISTANCE_DATA {
33820    type Message = MavMessage;
33821    const ID: u32 = 9000u32;
33822    const NAME: &'static str = "WHEEL_DISTANCE";
33823    const EXTRA_CRC: u8 = 113u8;
33824    const ENCODED_LEN: usize = 137usize;
33825    fn deser(
33826        _version: MavlinkVersion,
33827        __input: &[u8],
33828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33829        let avail_len = __input.len();
33830        let mut payload_buf = [0; Self::ENCODED_LEN];
33831        let mut buf = if avail_len < Self::ENCODED_LEN {
33832            payload_buf[0..avail_len].copy_from_slice(__input);
33833            Bytes::new(&payload_buf)
33834        } else {
33835            Bytes::new(__input)
33836        };
33837        let mut __struct = Self::default();
33838        __struct.time_usec = buf.get_u64_le();
33839        for v in &mut __struct.distance {
33840            let val = buf.get_f64_le();
33841            *v = val;
33842        }
33843        __struct.count = buf.get_u8();
33844        Ok(__struct)
33845    }
33846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33847        let mut __tmp = BytesMut::new(bytes);
33848        #[allow(clippy::absurd_extreme_comparisons)]
33849        #[allow(unused_comparisons)]
33850        if __tmp.remaining() < Self::ENCODED_LEN {
33851            panic!(
33852                "buffer is too small (need {} bytes, but got {})",
33853                Self::ENCODED_LEN,
33854                __tmp.remaining(),
33855            )
33856        }
33857        __tmp.put_u64_le(self.time_usec);
33858        for val in &self.distance {
33859            __tmp.put_f64_le(*val);
33860        }
33861        __tmp.put_u8(self.count);
33862        if matches!(version, MavlinkVersion::V2) {
33863            let len = __tmp.len();
33864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33865        } else {
33866            __tmp.len()
33867        }
33868    }
33869}
33870#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33871#[doc = ""]
33872#[doc = "ID: 299"]
33873#[derive(Debug, Clone, PartialEq)]
33874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33876#[cfg_attr(feature = "ts", derive(TS))]
33877#[cfg_attr(feature = "ts", ts(export))]
33878pub struct WIFI_CONFIG_AP_DATA {
33879    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33880    #[cfg_attr(feature = "ts", ts(type = "string"))]
33881    pub ssid: CharArray<32>,
33882    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33883    #[cfg_attr(feature = "ts", ts(type = "string"))]
33884    pub password: CharArray<64>,
33885    #[doc = "WiFi Mode."]
33886    #[cfg_attr(feature = "serde", serde(default))]
33887    pub mode: WifiConfigApMode,
33888    #[doc = "Message acceptance response (sent back to GS)."]
33889    #[cfg_attr(feature = "serde", serde(default))]
33890    pub response: WifiConfigApResponse,
33891}
33892impl WIFI_CONFIG_AP_DATA {
33893    pub const ENCODED_LEN: usize = 98usize;
33894    pub const DEFAULT: Self = Self {
33895        ssid: CharArray::new([0_u8; 32usize]),
33896        password: CharArray::new([0_u8; 64usize]),
33897        mode: WifiConfigApMode::DEFAULT,
33898        response: WifiConfigApResponse::DEFAULT,
33899    };
33900    #[cfg(feature = "arbitrary")]
33901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33902        use arbitrary::{Arbitrary, Unstructured};
33903        let mut buf = [0u8; 1024];
33904        rng.fill_bytes(&mut buf);
33905        let mut unstructured = Unstructured::new(&buf);
33906        Self::arbitrary(&mut unstructured).unwrap_or_default()
33907    }
33908}
33909impl Default for WIFI_CONFIG_AP_DATA {
33910    fn default() -> Self {
33911        Self::DEFAULT.clone()
33912    }
33913}
33914impl MessageData for WIFI_CONFIG_AP_DATA {
33915    type Message = MavMessage;
33916    const ID: u32 = 299u32;
33917    const NAME: &'static str = "WIFI_CONFIG_AP";
33918    const EXTRA_CRC: u8 = 19u8;
33919    const ENCODED_LEN: usize = 98usize;
33920    fn deser(
33921        _version: MavlinkVersion,
33922        __input: &[u8],
33923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33924        let avail_len = __input.len();
33925        let mut payload_buf = [0; Self::ENCODED_LEN];
33926        let mut buf = if avail_len < Self::ENCODED_LEN {
33927            payload_buf[0..avail_len].copy_from_slice(__input);
33928            Bytes::new(&payload_buf)
33929        } else {
33930            Bytes::new(__input)
33931        };
33932        let mut __struct = Self::default();
33933        let mut tmp = [0_u8; 32usize];
33934        for v in &mut tmp {
33935            *v = buf.get_u8();
33936        }
33937        __struct.ssid = CharArray::new(tmp);
33938        let mut tmp = [0_u8; 64usize];
33939        for v in &mut tmp {
33940            *v = buf.get_u8();
33941        }
33942        __struct.password = CharArray::new(tmp);
33943        let tmp = buf.get_i8();
33944        __struct.mode =
33945            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33946                enum_type: "WifiConfigApMode",
33947                value: tmp as u64,
33948            })?;
33949        let tmp = buf.get_i8();
33950        __struct.response =
33951            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33952                enum_type: "WifiConfigApResponse",
33953                value: tmp as u64,
33954            })?;
33955        Ok(__struct)
33956    }
33957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33958        let mut __tmp = BytesMut::new(bytes);
33959        #[allow(clippy::absurd_extreme_comparisons)]
33960        #[allow(unused_comparisons)]
33961        if __tmp.remaining() < Self::ENCODED_LEN {
33962            panic!(
33963                "buffer is too small (need {} bytes, but got {})",
33964                Self::ENCODED_LEN,
33965                __tmp.remaining(),
33966            )
33967        }
33968        for val in &self.ssid {
33969            __tmp.put_u8(*val);
33970        }
33971        for val in &self.password {
33972            __tmp.put_u8(*val);
33973        }
33974        if matches!(version, MavlinkVersion::V2) {
33975            __tmp.put_i8(self.mode as i8);
33976            __tmp.put_i8(self.response as i8);
33977            let len = __tmp.len();
33978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33979        } else {
33980            __tmp.len()
33981        }
33982    }
33983}
33984#[doc = "Winch status."]
33985#[doc = ""]
33986#[doc = "ID: 9005"]
33987#[derive(Debug, Clone, PartialEq)]
33988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33990#[cfg_attr(feature = "ts", derive(TS))]
33991#[cfg_attr(feature = "ts", ts(export))]
33992pub struct WINCH_STATUS_DATA {
33993    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33994    pub time_usec: u64,
33995    #[doc = "Length of line released. NaN if unknown"]
33996    pub line_length: f32,
33997    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33998    pub speed: f32,
33999    #[doc = "Tension on the line. NaN if unknown"]
34000    pub tension: f32,
34001    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34002    pub voltage: f32,
34003    #[doc = "Current draw from the winch. NaN if unknown"]
34004    pub current: f32,
34005    #[doc = "Status flags"]
34006    pub status: MavWinchStatusFlag,
34007    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34008    pub temperature: i16,
34009}
34010impl WINCH_STATUS_DATA {
34011    pub const ENCODED_LEN: usize = 34usize;
34012    pub const DEFAULT: Self = Self {
34013        time_usec: 0_u64,
34014        line_length: 0.0_f32,
34015        speed: 0.0_f32,
34016        tension: 0.0_f32,
34017        voltage: 0.0_f32,
34018        current: 0.0_f32,
34019        status: MavWinchStatusFlag::DEFAULT,
34020        temperature: 0_i16,
34021    };
34022    #[cfg(feature = "arbitrary")]
34023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34024        use arbitrary::{Arbitrary, Unstructured};
34025        let mut buf = [0u8; 1024];
34026        rng.fill_bytes(&mut buf);
34027        let mut unstructured = Unstructured::new(&buf);
34028        Self::arbitrary(&mut unstructured).unwrap_or_default()
34029    }
34030}
34031impl Default for WINCH_STATUS_DATA {
34032    fn default() -> Self {
34033        Self::DEFAULT.clone()
34034    }
34035}
34036impl MessageData for WINCH_STATUS_DATA {
34037    type Message = MavMessage;
34038    const ID: u32 = 9005u32;
34039    const NAME: &'static str = "WINCH_STATUS";
34040    const EXTRA_CRC: u8 = 117u8;
34041    const ENCODED_LEN: usize = 34usize;
34042    fn deser(
34043        _version: MavlinkVersion,
34044        __input: &[u8],
34045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34046        let avail_len = __input.len();
34047        let mut payload_buf = [0; Self::ENCODED_LEN];
34048        let mut buf = if avail_len < Self::ENCODED_LEN {
34049            payload_buf[0..avail_len].copy_from_slice(__input);
34050            Bytes::new(&payload_buf)
34051        } else {
34052            Bytes::new(__input)
34053        };
34054        let mut __struct = Self::default();
34055        __struct.time_usec = buf.get_u64_le();
34056        __struct.line_length = buf.get_f32_le();
34057        __struct.speed = buf.get_f32_le();
34058        __struct.tension = buf.get_f32_le();
34059        __struct.voltage = buf.get_f32_le();
34060        __struct.current = buf.get_f32_le();
34061        let tmp = buf.get_u32_le();
34062        __struct.status = MavWinchStatusFlag::from_bits(tmp).ok_or(
34063            ::mavlink_core::error::ParserError::InvalidFlag {
34064                flag_type: "MavWinchStatusFlag",
34065                value: tmp as u64,
34066            },
34067        )?;
34068        __struct.temperature = buf.get_i16_le();
34069        Ok(__struct)
34070    }
34071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34072        let mut __tmp = BytesMut::new(bytes);
34073        #[allow(clippy::absurd_extreme_comparisons)]
34074        #[allow(unused_comparisons)]
34075        if __tmp.remaining() < Self::ENCODED_LEN {
34076            panic!(
34077                "buffer is too small (need {} bytes, but got {})",
34078                Self::ENCODED_LEN,
34079                __tmp.remaining(),
34080            )
34081        }
34082        __tmp.put_u64_le(self.time_usec);
34083        __tmp.put_f32_le(self.line_length);
34084        __tmp.put_f32_le(self.speed);
34085        __tmp.put_f32_le(self.tension);
34086        __tmp.put_f32_le(self.voltage);
34087        __tmp.put_f32_le(self.current);
34088        __tmp.put_u32_le(self.status.bits());
34089        __tmp.put_i16_le(self.temperature);
34090        if matches!(version, MavlinkVersion::V2) {
34091            let len = __tmp.len();
34092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34093        } else {
34094            __tmp.len()
34095        }
34096    }
34097}
34098#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34099#[doc = ""]
34100#[doc = "ID: 231"]
34101#[derive(Debug, Clone, PartialEq)]
34102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34104#[cfg_attr(feature = "ts", derive(TS))]
34105#[cfg_attr(feature = "ts", ts(export))]
34106pub struct WIND_COV_DATA {
34107    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34108    pub time_usec: u64,
34109    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34110    pub wind_x: f32,
34111    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34112    pub wind_y: f32,
34113    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34114    pub wind_z: f32,
34115    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34116    pub var_horiz: f32,
34117    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34118    pub var_vert: f32,
34119    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34120    pub wind_alt: f32,
34121    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34122    pub horiz_accuracy: f32,
34123    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34124    pub vert_accuracy: f32,
34125}
34126impl WIND_COV_DATA {
34127    pub const ENCODED_LEN: usize = 40usize;
34128    pub const DEFAULT: Self = Self {
34129        time_usec: 0_u64,
34130        wind_x: 0.0_f32,
34131        wind_y: 0.0_f32,
34132        wind_z: 0.0_f32,
34133        var_horiz: 0.0_f32,
34134        var_vert: 0.0_f32,
34135        wind_alt: 0.0_f32,
34136        horiz_accuracy: 0.0_f32,
34137        vert_accuracy: 0.0_f32,
34138    };
34139    #[cfg(feature = "arbitrary")]
34140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34141        use arbitrary::{Arbitrary, Unstructured};
34142        let mut buf = [0u8; 1024];
34143        rng.fill_bytes(&mut buf);
34144        let mut unstructured = Unstructured::new(&buf);
34145        Self::arbitrary(&mut unstructured).unwrap_or_default()
34146    }
34147}
34148impl Default for WIND_COV_DATA {
34149    fn default() -> Self {
34150        Self::DEFAULT.clone()
34151    }
34152}
34153impl MessageData for WIND_COV_DATA {
34154    type Message = MavMessage;
34155    const ID: u32 = 231u32;
34156    const NAME: &'static str = "WIND_COV";
34157    const EXTRA_CRC: u8 = 105u8;
34158    const ENCODED_LEN: usize = 40usize;
34159    fn deser(
34160        _version: MavlinkVersion,
34161        __input: &[u8],
34162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34163        let avail_len = __input.len();
34164        let mut payload_buf = [0; Self::ENCODED_LEN];
34165        let mut buf = if avail_len < Self::ENCODED_LEN {
34166            payload_buf[0..avail_len].copy_from_slice(__input);
34167            Bytes::new(&payload_buf)
34168        } else {
34169            Bytes::new(__input)
34170        };
34171        let mut __struct = Self::default();
34172        __struct.time_usec = buf.get_u64_le();
34173        __struct.wind_x = buf.get_f32_le();
34174        __struct.wind_y = buf.get_f32_le();
34175        __struct.wind_z = buf.get_f32_le();
34176        __struct.var_horiz = buf.get_f32_le();
34177        __struct.var_vert = buf.get_f32_le();
34178        __struct.wind_alt = buf.get_f32_le();
34179        __struct.horiz_accuracy = buf.get_f32_le();
34180        __struct.vert_accuracy = buf.get_f32_le();
34181        Ok(__struct)
34182    }
34183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34184        let mut __tmp = BytesMut::new(bytes);
34185        #[allow(clippy::absurd_extreme_comparisons)]
34186        #[allow(unused_comparisons)]
34187        if __tmp.remaining() < Self::ENCODED_LEN {
34188            panic!(
34189                "buffer is too small (need {} bytes, but got {})",
34190                Self::ENCODED_LEN,
34191                __tmp.remaining(),
34192            )
34193        }
34194        __tmp.put_u64_le(self.time_usec);
34195        __tmp.put_f32_le(self.wind_x);
34196        __tmp.put_f32_le(self.wind_y);
34197        __tmp.put_f32_le(self.wind_z);
34198        __tmp.put_f32_le(self.var_horiz);
34199        __tmp.put_f32_le(self.var_vert);
34200        __tmp.put_f32_le(self.wind_alt);
34201        __tmp.put_f32_le(self.horiz_accuracy);
34202        __tmp.put_f32_le(self.vert_accuracy);
34203        if matches!(version, MavlinkVersion::V2) {
34204            let len = __tmp.len();
34205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34206        } else {
34207            __tmp.len()
34208        }
34209    }
34210}
34211#[derive(Clone, PartialEq, Debug)]
34212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34213#[cfg_attr(feature = "serde", serde(tag = "type"))]
34214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34215#[cfg_attr(feature = "ts", derive(TS))]
34216#[cfg_attr(feature = "ts", ts(export))]
34217#[repr(u32)]
34218pub enum MavMessage {
34219    #[doc = "Set the vehicle attitude and body angular rates."]
34220    #[doc = ""]
34221    #[doc = "ID: 140"]
34222    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34223    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34224    #[doc = ""]
34225    #[doc = "ID: 375"]
34226    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34227    #[doc = "The location and information of an ADSB vehicle."]
34228    #[doc = ""]
34229    #[doc = "ID: 246"]
34230    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34231    #[doc = "The location and information of an AIS vessel."]
34232    #[doc = ""]
34233    #[doc = "ID: 301"]
34234    AIS_VESSEL(AIS_VESSEL_DATA),
34235    #[doc = "The current system altitude."]
34236    #[doc = ""]
34237    #[doc = "ID: 141"]
34238    ALTITUDE(ALTITUDE_DATA),
34239    #[doc = "ASL-fixed-wing controller data."]
34240    #[doc = ""]
34241    #[doc = "ID: 8004"]
34242    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
34243    #[doc = "ASL-fixed-wing controller debug data."]
34244    #[doc = ""]
34245    #[doc = "ID: 8005"]
34246    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
34247    #[doc = "Extended state information for ASLUAVs."]
34248    #[doc = ""]
34249    #[doc = "ID: 8006"]
34250    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
34251    #[doc = "Off-board controls/commands for ASLUAVs."]
34252    #[doc = ""]
34253    #[doc = "ID: 8008"]
34254    ASL_OBCTRL(ASL_OBCTRL_DATA),
34255    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34256    #[doc = ""]
34257    #[doc = "ID: 30"]
34258    ATTITUDE(ATTITUDE_DATA),
34259    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34260    #[doc = ""]
34261    #[doc = "ID: 31"]
34262    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34263    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34264    #[doc = ""]
34265    #[doc = "ID: 61"]
34266    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34267    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34268    #[doc = ""]
34269    #[doc = "ID: 83"]
34270    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34271    #[doc = "Motion capture attitude and position."]
34272    #[doc = ""]
34273    #[doc = "ID: 138"]
34274    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34275    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34276    #[doc = ""]
34277    #[doc = "ID: 7"]
34278    AUTH_KEY(AUTH_KEY_DATA),
34279    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34280    #[doc = ""]
34281    #[doc = "ID: 286"]
34282    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34283    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34284    #[doc = ""]
34285    #[doc = "ID: 148"]
34286    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34287    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34288    #[doc = ""]
34289    #[doc = "ID: 435"]
34290    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34291    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34292    #[doc = ""]
34293    #[doc = "ID: 437"]
34294    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34295    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34296    #[doc = ""]
34297    #[doc = "ID: 372"]
34298    BATTERY_INFO(BATTERY_INFO_DATA),
34299    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34300    #[doc = ""]
34301    #[doc = "ID: 147"]
34302    BATTERY_STATUS(BATTERY_STATUS_DATA),
34303    #[doc = "Report button state change."]
34304    #[doc = ""]
34305    #[doc = "ID: 257"]
34306    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34307    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34308    #[doc = ""]
34309    #[doc = "ID: 262"]
34310    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34311    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34312    #[doc = ""]
34313    #[doc = "ID: 271"]
34314    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34315    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34316    #[doc = ""]
34317    #[doc = "ID: 263"]
34318    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34319    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34320    #[doc = ""]
34321    #[doc = "ID: 259"]
34322    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34323    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34324    #[doc = ""]
34325    #[doc = "ID: 260"]
34326    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34327    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34328    #[doc = ""]
34329    #[doc = "ID: 277"]
34330    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34331    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34332    #[doc = ""]
34333    #[doc = "ID: 276"]
34334    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34335    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34336    #[doc = ""]
34337    #[doc = "ID: 275"]
34338    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34339    #[doc = "Camera-IMU triggering and synchronisation message."]
34340    #[doc = ""]
34341    #[doc = "ID: 112"]
34342    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34343    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34344    #[doc = ""]
34345    #[doc = "ID: 387"]
34346    CANFD_FRAME(CANFD_FRAME_DATA),
34347    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34348    #[doc = ""]
34349    #[doc = "ID: 388"]
34350    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34351    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34352    #[doc = ""]
34353    #[doc = "ID: 386"]
34354    CAN_FRAME(CAN_FRAME_DATA),
34355    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34356    #[doc = ""]
34357    #[doc = "ID: 336"]
34358    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34359    #[doc = "Report current used cellular network status."]
34360    #[doc = ""]
34361    #[doc = "ID: 334"]
34362    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34363    #[doc = "Request to control this MAV."]
34364    #[doc = ""]
34365    #[doc = "ID: 5"]
34366    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34367    #[doc = "Accept / deny control of this MAV."]
34368    #[doc = ""]
34369    #[doc = "ID: 6"]
34370    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34371    #[doc = "Information about a potential collision."]
34372    #[doc = ""]
34373    #[doc = "ID: 247"]
34374    COLLISION(COLLISION_DATA),
34375    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34376    #[doc = ""]
34377    #[doc = "ID: 77"]
34378    COMMAND_ACK(COMMAND_ACK_DATA),
34379    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34380    #[doc = ""]
34381    #[doc = "ID: 80"]
34382    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34383    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34384    #[doc = ""]
34385    #[doc = "ID: 75"]
34386    COMMAND_INT(COMMAND_INT_DATA),
34387    #[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
34388    #[doc = ""]
34389    #[doc = "ID: 223"]
34390    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
34391    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34392    #[doc = ""]
34393    #[doc = "ID: 76"]
34394    COMMAND_LONG(COMMAND_LONG_DATA),
34395    #[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
34396    #[doc = ""]
34397    #[doc = "ID: 224"]
34398    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
34399    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34400    #[doc = ""]
34401    #[doc = "ID: 395"]
34402    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34403    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34404    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34405    #[doc = ""]
34406    #[doc = "ID: 396"]
34407    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34408    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34409    #[doc = ""]
34410    #[doc = "ID: 397"]
34411    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34412    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34413    #[doc = ""]
34414    #[doc = "ID: 146"]
34415    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34416    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34417    #[doc = ""]
34418    #[doc = "ID: 411"]
34419    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34420    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34421    #[doc = ""]
34422    #[doc = "ID: 436"]
34423    CURRENT_MODE(CURRENT_MODE_DATA),
34424    #[doc = "Data stream status information."]
34425    #[doc = ""]
34426    #[doc = "ID: 67"]
34427    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34428    DATA_STREAM(DATA_STREAM_DATA),
34429    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34430    #[doc = ""]
34431    #[doc = "ID: 130"]
34432    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34433    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34434    #[doc = ""]
34435    #[doc = "ID: 254"]
34436    DEBUG(DEBUG_DATA),
34437    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34438    #[doc = ""]
34439    #[doc = "ID: 350"]
34440    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34441    #[doc = "To debug something using a named 3D vector."]
34442    #[doc = ""]
34443    #[doc = "ID: 250"]
34444    DEBUG_VECT(DEBUG_VECT_DATA),
34445    #[doc = "Distance sensor information for an onboard rangefinder."]
34446    #[doc = ""]
34447    #[doc = "ID: 132"]
34448    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34449    #[doc = "EFI status output."]
34450    #[doc = ""]
34451    #[doc = "ID: 225"]
34452    EFI_STATUS(EFI_STATUS_DATA),
34453    #[doc = "Extended EKF state estimates for ASLUAVs."]
34454    #[doc = ""]
34455    #[doc = "ID: 8007"]
34456    EKF_EXT(EKF_EXT_DATA),
34457    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34458    #[doc = ""]
34459    #[doc = "ID: 131"]
34460    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34461    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34462    #[doc = ""]
34463    #[doc = "ID: 290"]
34464    ESC_INFO(ESC_INFO_DATA),
34465    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34466    #[doc = ""]
34467    #[doc = "ID: 291"]
34468    ESC_STATUS(ESC_STATUS_DATA),
34469    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34470    #[doc = ""]
34471    #[doc = "ID: 230"]
34472    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34473    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34474    #[doc = ""]
34475    #[doc = "ID: 410"]
34476    EVENT(EVENT_DATA),
34477    #[doc = "Provides state for additional features."]
34478    #[doc = ""]
34479    #[doc = "ID: 245"]
34480    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34481    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34482    #[doc = ""]
34483    #[doc = "ID: 162"]
34484    FENCE_STATUS(FENCE_STATUS_DATA),
34485    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34486    #[doc = ""]
34487    #[doc = "ID: 110"]
34488    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34489    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34490    #[doc = ""]
34491    #[doc = "ID: 264"]
34492    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34493    #[doc = "Current motion information from a designated system."]
34494    #[doc = ""]
34495    #[doc = "ID: 144"]
34496    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34497    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34498    #[doc = ""]
34499    #[doc = "ID: 371"]
34500    FUEL_STATUS(FUEL_STATUS_DATA),
34501    #[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
34502    #[doc = ""]
34503    #[doc = "ID: 8011"]
34504    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
34505    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34506    #[doc = ""]
34507    #[doc = "ID: 373"]
34508    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34509    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34510    #[doc = ""]
34511    #[doc = "ID: 285"]
34512    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34513    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34514    #[doc = ""]
34515    #[doc = "ID: 283"]
34516    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34517    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34518    #[doc = ""]
34519    #[doc = "ID: 284"]
34520    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34521    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34522    #[doc = ""]
34523    #[doc = "ID: 280"]
34524    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34525    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34526    #[doc = ""]
34527    #[doc = "ID: 282"]
34528    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34529    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34530    #[doc = ""]
34531    #[doc = "ID: 288"]
34532    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34533    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34534    #[doc = ""]
34535    #[doc = "ID: 287"]
34536    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34537    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34538    #[doc = ""]
34539    #[doc = "ID: 281"]
34540    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34541    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34542    #[doc = ""]
34543    #[doc = "ID: 33"]
34544    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34545    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34546    #[doc = ""]
34547    #[doc = "ID: 63"]
34548    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34549    #[doc = "Global position/attitude estimate from a vision source."]
34550    #[doc = ""]
34551    #[doc = "ID: 101"]
34552    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34553    #[doc = "Second GPS data."]
34554    #[doc = ""]
34555    #[doc = "ID: 124"]
34556    GPS2_RAW(GPS2_RAW_DATA),
34557    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34558    #[doc = ""]
34559    #[doc = "ID: 128"]
34560    GPS2_RTK(GPS2_RTK_DATA),
34561    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34562    #[doc = ""]
34563    #[doc = "ID: 49"]
34564    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34565    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34566    #[doc = ""]
34567    #[doc = "ID: 123"]
34568    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34569    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34570    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34571    #[doc = ""]
34572    #[doc = "ID: 232"]
34573    GPS_INPUT(GPS_INPUT_DATA),
34574    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34575    #[doc = ""]
34576    #[doc = "ID: 24"]
34577    GPS_RAW_INT(GPS_RAW_INT_DATA),
34578    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34579    #[doc = ""]
34580    #[doc = "ID: 233"]
34581    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34582    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34583    #[doc = ""]
34584    #[doc = "ID: 127"]
34585    GPS_RTK(GPS_RTK_DATA),
34586    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34587    #[doc = ""]
34588    #[doc = "ID: 25"]
34589    GPS_STATUS(GPS_STATUS_DATA),
34590    #[doc = "Status of GSM modem (connected to onboard computer)."]
34591    #[doc = ""]
34592    #[doc = "ID: 8014"]
34593    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
34594    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34595    #[doc = ""]
34596    #[doc = "ID: 0"]
34597    HEARTBEAT(HEARTBEAT_DATA),
34598    #[doc = "The IMU readings in SI units in NED body frame."]
34599    #[doc = ""]
34600    #[doc = "ID: 105"]
34601    HIGHRES_IMU(HIGHRES_IMU_DATA),
34602    #[doc = "Message appropriate for high latency connections like Iridium."]
34603    #[doc = ""]
34604    #[doc = "ID: 234"]
34605    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34606    HIGH_LATENCY(HIGH_LATENCY_DATA),
34607    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34608    #[doc = ""]
34609    #[doc = "ID: 235"]
34610    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34611    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34612    #[doc = ""]
34613    #[doc = "ID: 93"]
34614    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34615    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34616    #[doc = ""]
34617    #[doc = "ID: 91"]
34618    HIL_CONTROLS(HIL_CONTROLS_DATA),
34619    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34620    #[doc = ""]
34621    #[doc = "ID: 113"]
34622    HIL_GPS(HIL_GPS_DATA),
34623    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34624    #[doc = ""]
34625    #[doc = "ID: 114"]
34626    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34627    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34628    #[doc = ""]
34629    #[doc = "ID: 92"]
34630    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34631    #[doc = "The IMU readings in SI units in NED body frame."]
34632    #[doc = ""]
34633    #[doc = "ID: 107"]
34634    HIL_SENSOR(HIL_SENSOR_DATA),
34635    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34636    #[doc = ""]
34637    #[doc = "ID: 90"]
34638    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34639    HIL_STATE(HIL_STATE_DATA),
34640    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34641    #[doc = ""]
34642    #[doc = "ID: 115"]
34643    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34644    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34645    #[doc = ""]
34646    #[doc = "ID: 242"]
34647    HOME_POSITION(HOME_POSITION_DATA),
34648    #[doc = "Temperature and humidity from hygrometer."]
34649    #[doc = ""]
34650    #[doc = "ID: 12920"]
34651    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34652    #[doc = "Illuminator status."]
34653    #[doc = ""]
34654    #[doc = "ID: 440"]
34655    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34656    #[doc = "Status of the Iridium SBD link."]
34657    #[doc = ""]
34658    #[doc = "ID: 335"]
34659    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34660    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34661    #[doc = ""]
34662    #[doc = "ID: 149"]
34663    LANDING_TARGET(LANDING_TARGET_DATA),
34664    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34665    #[doc = ""]
34666    #[doc = "ID: 8"]
34667    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34668    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34669    #[doc = ""]
34670    #[doc = "ID: 32"]
34671    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34672    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34673    #[doc = ""]
34674    #[doc = "ID: 64"]
34675    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34676    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34677    #[doc = ""]
34678    #[doc = "ID: 89"]
34679    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34680    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34681    #[doc = ""]
34682    #[doc = "ID: 268"]
34683    LOGGING_ACK(LOGGING_ACK_DATA),
34684    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34685    #[doc = ""]
34686    #[doc = "ID: 266"]
34687    LOGGING_DATA(LOGGING_DATA_DATA),
34688    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34689    #[doc = ""]
34690    #[doc = "ID: 267"]
34691    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34692    #[doc = "Reply to LOG_REQUEST_DATA."]
34693    #[doc = ""]
34694    #[doc = "ID: 120"]
34695    LOG_DATA(LOG_DATA_DATA),
34696    #[doc = "Reply to LOG_REQUEST_LIST."]
34697    #[doc = ""]
34698    #[doc = "ID: 118"]
34699    LOG_ENTRY(LOG_ENTRY_DATA),
34700    #[doc = "Erase all logs."]
34701    #[doc = ""]
34702    #[doc = "ID: 121"]
34703    LOG_ERASE(LOG_ERASE_DATA),
34704    #[doc = "Request a chunk of a log."]
34705    #[doc = ""]
34706    #[doc = "ID: 119"]
34707    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34708    #[doc = "Stop log transfer and resume normal logging."]
34709    #[doc = ""]
34710    #[doc = "ID: 122"]
34711    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34712    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34713    #[doc = ""]
34714    #[doc = "ID: 117"]
34715    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34716    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34717    #[doc = ""]
34718    #[doc = "ID: 192"]
34719    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34720    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34721    #[doc = ""]
34722    #[doc = "ID: 69"]
34723    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34724    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34725    #[doc = ""]
34726    #[doc = "ID: 81"]
34727    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34728    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34729    #[doc = ""]
34730    #[doc = "ID: 249"]
34731    MEMORY_VECT(MEMORY_VECT_DATA),
34732    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34733    #[doc = ""]
34734    #[doc = "ID: 244"]
34735    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34736    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34737    #[doc = ""]
34738    #[doc = "ID: 47"]
34739    MISSION_ACK(MISSION_ACK_DATA),
34740    #[doc = "Delete all mission items at once."]
34741    #[doc = ""]
34742    #[doc = "ID: 45"]
34743    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34744    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34745    #[doc = ""]
34746    #[doc = "ID: 44"]
34747    MISSION_COUNT(MISSION_COUNT_DATA),
34748    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34749    #[doc = ""]
34750    #[doc = "ID: 42"]
34751    MISSION_CURRENT(MISSION_CURRENT_DATA),
34752    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34753    #[doc = ""]
34754    #[doc = "ID: 39"]
34755    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34756    MISSION_ITEM(MISSION_ITEM_DATA),
34757    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34758    #[doc = ""]
34759    #[doc = "ID: 73"]
34760    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34761    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34762    #[doc = ""]
34763    #[doc = "ID: 46"]
34764    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34765    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34766    #[doc = ""]
34767    #[doc = "ID: 40"]
34768    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34769    MISSION_REQUEST(MISSION_REQUEST_DATA),
34770    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34771    #[doc = ""]
34772    #[doc = "ID: 51"]
34773    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34774    #[doc = "Request the overall list of mission items from the system/component."]
34775    #[doc = ""]
34776    #[doc = "ID: 43"]
34777    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34778    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34779    #[doc = ""]
34780    #[doc = "ID: 37"]
34781    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34782    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34783    #[doc = ""]
34784    #[doc = "ID: 41"]
34785    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34786    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34787    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34788    #[doc = ""]
34789    #[doc = "ID: 38"]
34790    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34791    #[doc = "Orientation of a mount."]
34792    #[doc = ""]
34793    #[doc = "ID: 265"]
34794    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34795    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34796    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34797    #[doc = ""]
34798    #[doc = "ID: 251"]
34799    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34800    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34801    #[doc = ""]
34802    #[doc = "ID: 252"]
34803    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34804    #[doc = "The state of the navigation and position controller."]
34805    #[doc = ""]
34806    #[doc = "ID: 62"]
34807    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34808    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34809    #[doc = ""]
34810    #[doc = "ID: 330"]
34811    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34812    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34813    #[doc = ""]
34814    #[doc = "ID: 331"]
34815    ODOMETRY(ODOMETRY_DATA),
34816    #[doc = "Hardware status sent by an onboard computer."]
34817    #[doc = ""]
34818    #[doc = "ID: 390"]
34819    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34820    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34821    #[doc = ""]
34822    #[doc = "ID: 12918"]
34823    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34824    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34825    #[doc = ""]
34826    #[doc = "ID: 12902"]
34827    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34828    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34829    #[doc = ""]
34830    #[doc = "ID: 12900"]
34831    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34832    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34833    #[doc = ""]
34834    #[doc = "ID: 12901"]
34835    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34836    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34837    #[doc = ""]
34838    #[doc = "ID: 12915"]
34839    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34840    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34841    #[doc = ""]
34842    #[doc = "ID: 12905"]
34843    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34844    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34845    #[doc = ""]
34846    #[doc = "ID: 12903"]
34847    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34848    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34849    #[doc = ""]
34850    #[doc = "ID: 12904"]
34851    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34852    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34853    #[doc = ""]
34854    #[doc = "ID: 12919"]
34855    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34856    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34857    #[doc = ""]
34858    #[doc = "ID: 100"]
34859    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34860    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34861    #[doc = ""]
34862    #[doc = "ID: 106"]
34863    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34864    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34865    #[doc = ""]
34866    #[doc = "ID: 360"]
34867    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34868    #[doc = "Response from a PARAM_EXT_SET message."]
34869    #[doc = ""]
34870    #[doc = "ID: 324"]
34871    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34872    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34873    #[doc = ""]
34874    #[doc = "ID: 321"]
34875    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34876    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34877    #[doc = ""]
34878    #[doc = "ID: 320"]
34879    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34880    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34881    #[doc = ""]
34882    #[doc = "ID: 323"]
34883    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34884    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34885    #[doc = ""]
34886    #[doc = "ID: 322"]
34887    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34888    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34889    #[doc = ""]
34890    #[doc = "ID: 50"]
34891    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34892    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34893    #[doc = ""]
34894    #[doc = "ID: 21"]
34895    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34896    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34897    #[doc = ""]
34898    #[doc = "ID: 20"]
34899    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34900    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34901    #[doc = ""]
34902    #[doc = "ID: 23"]
34903    PARAM_SET(PARAM_SET_DATA),
34904    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34905    #[doc = ""]
34906    #[doc = "ID: 22"]
34907    PARAM_VALUE(PARAM_VALUE_DATA),
34908    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34909    #[doc = ""]
34910    #[doc = "ID: 4"]
34911    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34912    PING(PING_DATA),
34913    #[doc = "Control vehicle tone generation (buzzer)."]
34914    #[doc = ""]
34915    #[doc = "ID: 258"]
34916    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34917    PLAY_TUNE(PLAY_TUNE_DATA),
34918    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34919    #[doc = ""]
34920    #[doc = "ID: 400"]
34921    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34922    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34923    #[doc = ""]
34924    #[doc = "ID: 87"]
34925    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34926    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34927    #[doc = ""]
34928    #[doc = "ID: 85"]
34929    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34930    #[doc = "Power supply status."]
34931    #[doc = ""]
34932    #[doc = "ID: 125"]
34933    POWER_STATUS(POWER_STATUS_DATA),
34934    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34935    #[doc = ""]
34936    #[doc = "ID: 300"]
34937    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34938    #[doc = "Status generated by radio and injected into MAVLink stream."]
34939    #[doc = ""]
34940    #[doc = "ID: 109"]
34941    RADIO_STATUS(RADIO_STATUS_DATA),
34942    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34943    #[doc = ""]
34944    #[doc = "ID: 27"]
34945    RAW_IMU(RAW_IMU_DATA),
34946    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34947    #[doc = ""]
34948    #[doc = "ID: 28"]
34949    RAW_PRESSURE(RAW_PRESSURE_DATA),
34950    #[doc = "RPM sensor data message."]
34951    #[doc = ""]
34952    #[doc = "ID: 339"]
34953    RAW_RPM(RAW_RPM_DATA),
34954    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34955    #[doc = ""]
34956    #[doc = "ID: 65"]
34957    RC_CHANNELS(RC_CHANNELS_DATA),
34958    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34959    #[doc = ""]
34960    #[doc = "ID: 70"]
34961    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34962    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34963    #[doc = ""]
34964    #[doc = "ID: 35"]
34965    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34966    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34967    #[doc = ""]
34968    #[doc = "ID: 34"]
34969    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34970    #[doc = "Request a data stream."]
34971    #[doc = ""]
34972    #[doc = "ID: 66"]
34973    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34974    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34975    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34976    #[doc = ""]
34977    #[doc = "ID: 412"]
34978    REQUEST_EVENT(REQUEST_EVENT_DATA),
34979    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34980    #[doc = ""]
34981    #[doc = "ID: 142"]
34982    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34983    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34984    #[doc = ""]
34985    #[doc = "ID: 413"]
34986    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34987    #[doc = "Read out the safety zone the MAV currently assumes."]
34988    #[doc = ""]
34989    #[doc = "ID: 55"]
34990    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34991    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34992    #[doc = ""]
34993    #[doc = "ID: 54"]
34994    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34995    #[doc = "Status of the SatCom link."]
34996    #[doc = ""]
34997    #[doc = "ID: 8015"]
34998    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
34999    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35000    #[doc = ""]
35001    #[doc = "ID: 26"]
35002    SCALED_IMU(SCALED_IMU_DATA),
35003    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35004    #[doc = ""]
35005    #[doc = "ID: 116"]
35006    SCALED_IMU2(SCALED_IMU2_DATA),
35007    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35008    #[doc = ""]
35009    #[doc = "ID: 129"]
35010    SCALED_IMU3(SCALED_IMU3_DATA),
35011    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35012    #[doc = ""]
35013    #[doc = "ID: 29"]
35014    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35015    #[doc = "Barometer readings for 2nd barometer."]
35016    #[doc = ""]
35017    #[doc = "ID: 137"]
35018    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35019    #[doc = "Barometer readings for 3rd barometer."]
35020    #[doc = ""]
35021    #[doc = "ID: 143"]
35022    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35023    #[doc = "Monitoring of sensorpod status."]
35024    #[doc = ""]
35025    #[doc = "ID: 8012"]
35026    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
35027    #[doc = "Calibrated airflow angle measurements."]
35028    #[doc = ""]
35029    #[doc = "ID: 8016"]
35030    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
35031    #[doc = "Atmospheric sensors (temperature, humidity, ...)."]
35032    #[doc = ""]
35033    #[doc = "ID: 8009"]
35034    SENS_ATMOS(SENS_ATMOS_DATA),
35035    #[doc = "Battery pack monitoring data for Li-Ion batteries."]
35036    #[doc = ""]
35037    #[doc = "ID: 8010"]
35038    SENS_BATMON(SENS_BATMON_DATA),
35039    #[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
35040    #[doc = ""]
35041    #[doc = "ID: 8003"]
35042    SENS_MPPT(SENS_MPPT_DATA),
35043    #[doc = "Voltage and current sensor data."]
35044    #[doc = ""]
35045    #[doc = "ID: 8002"]
35046    SENS_POWER(SENS_POWER_DATA),
35047    #[doc = "Monitoring of power board status."]
35048    #[doc = ""]
35049    #[doc = "ID: 8013"]
35050    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
35051    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35052    #[doc = ""]
35053    #[doc = "ID: 126"]
35054    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35055    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35056    #[doc = ""]
35057    #[doc = "ID: 36"]
35058    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35059    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35060    #[doc = ""]
35061    #[doc = "ID: 256"]
35062    SETUP_SIGNING(SETUP_SIGNING_DATA),
35063    #[doc = "Set the vehicle attitude and body angular rates."]
35064    #[doc = ""]
35065    #[doc = "ID: 139"]
35066    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35067    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35068    #[doc = ""]
35069    #[doc = "ID: 82"]
35070    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35071    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35072    #[doc = ""]
35073    #[doc = "ID: 48"]
35074    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35075    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35076    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35077    #[doc = ""]
35078    #[doc = "ID: 243"]
35079    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35080    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35081    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35082    #[doc = ""]
35083    #[doc = "ID: 11"]
35084    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35085    SET_MODE(SET_MODE_DATA),
35086    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35087    #[doc = ""]
35088    #[doc = "ID: 86"]
35089    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35090    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35091    #[doc = ""]
35092    #[doc = "ID: 84"]
35093    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35094    #[doc = "Status of simulation environment, if used."]
35095    #[doc = ""]
35096    #[doc = "ID: 108"]
35097    SIM_STATE(SIM_STATE_DATA),
35098    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35099    #[doc = ""]
35100    #[doc = "ID: 370"]
35101    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35102    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35103    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35104    #[doc = ""]
35105    #[doc = "ID: 253"]
35106    STATUSTEXT(STATUSTEXT_DATA),
35107    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35108    #[doc = ""]
35109    #[doc = "ID: 261"]
35110    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35111    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35112    #[doc = ""]
35113    #[doc = "ID: 401"]
35114    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35115    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35116    #[doc = ""]
35117    #[doc = "ID: 2"]
35118    SYSTEM_TIME(SYSTEM_TIME_DATA),
35119    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35120    #[doc = ""]
35121    #[doc = "ID: 1"]
35122    SYS_STATUS(SYS_STATUS_DATA),
35123    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35124    #[doc = ""]
35125    #[doc = "ID: 135"]
35126    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35127    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35128    #[doc = ""]
35129    #[doc = "ID: 134"]
35130    TERRAIN_DATA(TERRAIN_DATA_DATA),
35131    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35132    #[doc = ""]
35133    #[doc = "ID: 136"]
35134    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35135    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35136    #[doc = ""]
35137    #[doc = "ID: 133"]
35138    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35139    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35140    #[doc = ""]
35141    #[doc = "ID: 111"]
35142    TIMESYNC(TIMESYNC_DATA),
35143    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35144    #[doc = ""]
35145    #[doc = "ID: 380"]
35146    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35147    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35148    #[doc = ""]
35149    #[doc = "ID: 333"]
35150    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35151    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35152    #[doc = ""]
35153    #[doc = "ID: 332"]
35154    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35155    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35156    #[doc = ""]
35157    #[doc = "ID: 385"]
35158    TUNNEL(TUNNEL_DATA),
35159    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35160    #[doc = ""]
35161    #[doc = "ID: 311"]
35162    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35163    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35164    #[doc = ""]
35165    #[doc = "ID: 310"]
35166    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35167    #[doc = "The global position resulting from GPS and sensor fusion."]
35168    #[doc = ""]
35169    #[doc = "ID: 340"]
35170    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35171    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35172    #[doc = ""]
35173    #[doc = "ID: 248"]
35174    V2_EXTENSION(V2_EXTENSION_DATA),
35175    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35176    #[doc = ""]
35177    #[doc = "ID: 74"]
35178    VFR_HUD(VFR_HUD_DATA),
35179    #[doc = "Vibration levels and accelerometer clipping."]
35180    #[doc = ""]
35181    #[doc = "ID: 241"]
35182    VIBRATION(VIBRATION_DATA),
35183    #[doc = "Global position estimate from a Vicon motion system source."]
35184    #[doc = ""]
35185    #[doc = "ID: 104"]
35186    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35187    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35188    #[doc = ""]
35189    #[doc = "ID: 269"]
35190    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35191    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35192    #[doc = ""]
35193    #[doc = "ID: 270"]
35194    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35195    #[doc = "Local position/attitude estimate from a vision source."]
35196    #[doc = ""]
35197    #[doc = "ID: 102"]
35198    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35199    #[doc = "Speed estimate from a vision source."]
35200    #[doc = ""]
35201    #[doc = "ID: 103"]
35202    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35203    #[doc = "Cumulative distance traveled for each reported wheel."]
35204    #[doc = ""]
35205    #[doc = "ID: 9000"]
35206    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35207    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35208    #[doc = ""]
35209    #[doc = "ID: 299"]
35210    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35211    #[doc = "Winch status."]
35212    #[doc = ""]
35213    #[doc = "ID: 9005"]
35214    WINCH_STATUS(WINCH_STATUS_DATA),
35215    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35216    #[doc = ""]
35217    #[doc = "ID: 231"]
35218    WIND_COV(WIND_COV_DATA),
35219}
35220impl MavMessage {
35221    pub const fn all_ids() -> &'static [u32] {
35222        &[
35223            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35224            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35225            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35226            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35227            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35228            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35229            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35230            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35231            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35232            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35233            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
35234            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
35235            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
35236            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
35237            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
35238            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
35239            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
35240            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
35241            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
35242            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
35243            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
35244            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
35245            12918u32, 12919u32, 12920u32,
35246        ]
35247    }
35248}
35249impl Message for MavMessage {
35250    fn parse(
35251        version: MavlinkVersion,
35252        id: u32,
35253        payload: &[u8],
35254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35255        match id {
35256            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35257                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35258                    .map(Self::ACTUATOR_CONTROL_TARGET)
35259            }
35260            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35261                .map(Self::ACTUATOR_OUTPUT_STATUS),
35262            ADSB_VEHICLE_DATA::ID => {
35263                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35264            }
35265            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35266            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35267            ASLCTRL_DATA_DATA::ID => {
35268                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
35269            }
35270            ASLCTRL_DEBUG_DATA::ID => {
35271                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
35272            }
35273            ASLUAV_STATUS_DATA::ID => {
35274                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
35275            }
35276            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
35277            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35278            ATTITUDE_QUATERNION_DATA::ID => {
35279                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35280            }
35281            ATTITUDE_QUATERNION_COV_DATA::ID => {
35282                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35283                    .map(Self::ATTITUDE_QUATERNION_COV)
35284            }
35285            ATTITUDE_TARGET_DATA::ID => {
35286                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35287            }
35288            ATT_POS_MOCAP_DATA::ID => {
35289                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35290            }
35291            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35292            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35293                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35294                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35295            }
35296            AUTOPILOT_VERSION_DATA::ID => {
35297                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35298            }
35299            AVAILABLE_MODES_DATA::ID => {
35300                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35301            }
35302            AVAILABLE_MODES_MONITOR_DATA::ID => {
35303                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35304                    .map(Self::AVAILABLE_MODES_MONITOR)
35305            }
35306            BATTERY_INFO_DATA::ID => {
35307                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35308            }
35309            BATTERY_STATUS_DATA::ID => {
35310                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35311            }
35312            BUTTON_CHANGE_DATA::ID => {
35313                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35314            }
35315            CAMERA_CAPTURE_STATUS_DATA::ID => {
35316                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35317            }
35318            CAMERA_FOV_STATUS_DATA::ID => {
35319                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35320            }
35321            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35322                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35323            }
35324            CAMERA_INFORMATION_DATA::ID => {
35325                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35326            }
35327            CAMERA_SETTINGS_DATA::ID => {
35328                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35329            }
35330            CAMERA_THERMAL_RANGE_DATA::ID => {
35331                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35332            }
35333            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35334                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35335                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35336            }
35337            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35338                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35339                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35340            }
35341            CAMERA_TRIGGER_DATA::ID => {
35342                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35343            }
35344            CANFD_FRAME_DATA::ID => {
35345                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35346            }
35347            CAN_FILTER_MODIFY_DATA::ID => {
35348                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35349            }
35350            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35351            CELLULAR_CONFIG_DATA::ID => {
35352                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35353            }
35354            CELLULAR_STATUS_DATA::ID => {
35355                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35356            }
35357            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35358                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35359                    .map(Self::CHANGE_OPERATOR_CONTROL)
35360            }
35361            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35362                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35363                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35364            }
35365            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35366            COMMAND_ACK_DATA::ID => {
35367                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35368            }
35369            COMMAND_CANCEL_DATA::ID => {
35370                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35371            }
35372            COMMAND_INT_DATA::ID => {
35373                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35374            }
35375            COMMAND_INT_STAMPED_DATA::ID => {
35376                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
35377            }
35378            COMMAND_LONG_DATA::ID => {
35379                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35380            }
35381            COMMAND_LONG_STAMPED_DATA::ID => {
35382                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
35383            }
35384            COMPONENT_INFORMATION_DATA::ID => {
35385                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35386            }
35387            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35388                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35389                    .map(Self::COMPONENT_INFORMATION_BASIC)
35390            }
35391            COMPONENT_METADATA_DATA::ID => {
35392                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35393            }
35394            CONTROL_SYSTEM_STATE_DATA::ID => {
35395                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35396            }
35397            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35398                .map(Self::CURRENT_EVENT_SEQUENCE),
35399            CURRENT_MODE_DATA::ID => {
35400                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35401            }
35402            DATA_STREAM_DATA::ID => {
35403                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35404            }
35405            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35406                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35407                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35408            }
35409            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35410            DEBUG_FLOAT_ARRAY_DATA::ID => {
35411                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35412            }
35413            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35414            DISTANCE_SENSOR_DATA::ID => {
35415                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35416            }
35417            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35418            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
35419            ENCAPSULATED_DATA_DATA::ID => {
35420                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35421            }
35422            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35423            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35424            ESTIMATOR_STATUS_DATA::ID => {
35425                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35426            }
35427            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35428            EXTENDED_SYS_STATE_DATA::ID => {
35429                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35430            }
35431            FENCE_STATUS_DATA::ID => {
35432                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35433            }
35434            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35435                .map(Self::FILE_TRANSFER_PROTOCOL),
35436            FLIGHT_INFORMATION_DATA::ID => {
35437                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35438            }
35439            FOLLOW_TARGET_DATA::ID => {
35440                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35441            }
35442            FUEL_STATUS_DATA::ID => {
35443                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35444            }
35445            FW_SOARING_DATA_DATA::ID => {
35446                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
35447            }
35448            GENERATOR_STATUS_DATA::ID => {
35449                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35450            }
35451            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35452                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35453                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35454            }
35455            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35456                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35457                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35458            }
35459            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35460                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35461                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35462            }
35463            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35464                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35465                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35466            }
35467            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35468                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35469                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35470            }
35471            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35472                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35473                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35474            }
35475            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35476                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35477                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35478            }
35479            GIMBAL_MANAGER_STATUS_DATA::ID => {
35480                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35481            }
35482            GLOBAL_POSITION_INT_DATA::ID => {
35483                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35484            }
35485            GLOBAL_POSITION_INT_COV_DATA::ID => {
35486                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35487                    .map(Self::GLOBAL_POSITION_INT_COV)
35488            }
35489            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35490                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35491                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35492            }
35493            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35494            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35495            GPS_GLOBAL_ORIGIN_DATA::ID => {
35496                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35497            }
35498            GPS_INJECT_DATA_DATA::ID => {
35499                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35500            }
35501            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35502            GPS_RAW_INT_DATA::ID => {
35503                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35504            }
35505            GPS_RTCM_DATA_DATA::ID => {
35506                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35507            }
35508            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35509            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35510            GSM_LINK_STATUS_DATA::ID => {
35511                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
35512            }
35513            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35514            HIGHRES_IMU_DATA::ID => {
35515                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35516            }
35517            HIGH_LATENCY_DATA::ID => {
35518                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35519            }
35520            HIGH_LATENCY2_DATA::ID => {
35521                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35522            }
35523            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35524                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35525            }
35526            HIL_CONTROLS_DATA::ID => {
35527                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35528            }
35529            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35530            HIL_OPTICAL_FLOW_DATA::ID => {
35531                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35532            }
35533            HIL_RC_INPUTS_RAW_DATA::ID => {
35534                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35535            }
35536            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35537            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35538            HIL_STATE_QUATERNION_DATA::ID => {
35539                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
35540            }
35541            HOME_POSITION_DATA::ID => {
35542                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
35543            }
35544            HYGROMETER_SENSOR_DATA::ID => {
35545                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
35546            }
35547            ILLUMINATOR_STATUS_DATA::ID => {
35548                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
35549            }
35550            ISBD_LINK_STATUS_DATA::ID => {
35551                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
35552            }
35553            LANDING_TARGET_DATA::ID => {
35554                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
35555            }
35556            LINK_NODE_STATUS_DATA::ID => {
35557                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
35558            }
35559            LOCAL_POSITION_NED_DATA::ID => {
35560                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
35561            }
35562            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
35563                .map(Self::LOCAL_POSITION_NED_COV),
35564            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35565                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
35566                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
35567            }
35568            LOGGING_ACK_DATA::ID => {
35569                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
35570            }
35571            LOGGING_DATA_DATA::ID => {
35572                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
35573            }
35574            LOGGING_DATA_ACKED_DATA::ID => {
35575                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
35576            }
35577            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
35578            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
35579            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
35580            LOG_REQUEST_DATA_DATA::ID => {
35581                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
35582            }
35583            LOG_REQUEST_END_DATA::ID => {
35584                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
35585            }
35586            LOG_REQUEST_LIST_DATA::ID => {
35587                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
35588            }
35589            MAG_CAL_REPORT_DATA::ID => {
35590                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35591            }
35592            MANUAL_CONTROL_DATA::ID => {
35593                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35594            }
35595            MANUAL_SETPOINT_DATA::ID => {
35596                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35597            }
35598            MEMORY_VECT_DATA::ID => {
35599                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35600            }
35601            MESSAGE_INTERVAL_DATA::ID => {
35602                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35603            }
35604            MISSION_ACK_DATA::ID => {
35605                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35606            }
35607            MISSION_CLEAR_ALL_DATA::ID => {
35608                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35609            }
35610            MISSION_COUNT_DATA::ID => {
35611                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35612            }
35613            MISSION_CURRENT_DATA::ID => {
35614                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35615            }
35616            MISSION_ITEM_DATA::ID => {
35617                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35618            }
35619            MISSION_ITEM_INT_DATA::ID => {
35620                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35621            }
35622            MISSION_ITEM_REACHED_DATA::ID => {
35623                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35624            }
35625            MISSION_REQUEST_DATA::ID => {
35626                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35627            }
35628            MISSION_REQUEST_INT_DATA::ID => {
35629                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35630            }
35631            MISSION_REQUEST_LIST_DATA::ID => {
35632                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35633            }
35634            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35635                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35636                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35637            }
35638            MISSION_SET_CURRENT_DATA::ID => {
35639                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35640            }
35641            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35642                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35643                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35644            }
35645            MOUNT_ORIENTATION_DATA::ID => {
35646                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35647            }
35648            NAMED_VALUE_FLOAT_DATA::ID => {
35649                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35650            }
35651            NAMED_VALUE_INT_DATA::ID => {
35652                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35653            }
35654            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35655                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35656            }
35657            OBSTACLE_DISTANCE_DATA::ID => {
35658                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35659            }
35660            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35661            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35662                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35663                    .map(Self::ONBOARD_COMPUTER_STATUS)
35664            }
35665            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35666                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35667                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35668            }
35669            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35670                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35671                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35672            }
35673            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35674                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35675            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35676                .map(Self::OPEN_DRONE_ID_LOCATION),
35677            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35678                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35679                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35680            }
35681            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35682                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35683                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35684            }
35685            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35686                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35687            }
35688            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35689                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35690            }
35691            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35692                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35693                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35694            }
35695            OPTICAL_FLOW_DATA::ID => {
35696                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35697            }
35698            OPTICAL_FLOW_RAD_DATA::ID => {
35699                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35700            }
35701            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35702                .map(Self::ORBIT_EXECUTION_STATUS),
35703            PARAM_EXT_ACK_DATA::ID => {
35704                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35705            }
35706            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35707                .map(Self::PARAM_EXT_REQUEST_LIST),
35708            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35709                .map(Self::PARAM_EXT_REQUEST_READ),
35710            PARAM_EXT_SET_DATA::ID => {
35711                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35712            }
35713            PARAM_EXT_VALUE_DATA::ID => {
35714                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35715            }
35716            PARAM_MAP_RC_DATA::ID => {
35717                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35718            }
35719            PARAM_REQUEST_LIST_DATA::ID => {
35720                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35721            }
35722            PARAM_REQUEST_READ_DATA::ID => {
35723                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35724            }
35725            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35726            PARAM_VALUE_DATA::ID => {
35727                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35728            }
35729            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35730            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35731            PLAY_TUNE_V2_DATA::ID => {
35732                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35733            }
35734            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35735                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35736                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35737            }
35738            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35739                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35740                    .map(Self::POSITION_TARGET_LOCAL_NED)
35741            }
35742            POWER_STATUS_DATA::ID => {
35743                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35744            }
35745            PROTOCOL_VERSION_DATA::ID => {
35746                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35747            }
35748            RADIO_STATUS_DATA::ID => {
35749                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35750            }
35751            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35752            RAW_PRESSURE_DATA::ID => {
35753                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35754            }
35755            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35756            RC_CHANNELS_DATA::ID => {
35757                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35758            }
35759            RC_CHANNELS_OVERRIDE_DATA::ID => {
35760                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35761            }
35762            RC_CHANNELS_RAW_DATA::ID => {
35763                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35764            }
35765            RC_CHANNELS_SCALED_DATA::ID => {
35766                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35767            }
35768            REQUEST_DATA_STREAM_DATA::ID => {
35769                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35770            }
35771            REQUEST_EVENT_DATA::ID => {
35772                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35773            }
35774            RESOURCE_REQUEST_DATA::ID => {
35775                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35776            }
35777            RESPONSE_EVENT_ERROR_DATA::ID => {
35778                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35779            }
35780            SAFETY_ALLOWED_AREA_DATA::ID => {
35781                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35782            }
35783            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35784                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35785                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35786            }
35787            SATCOM_LINK_STATUS_DATA::ID => {
35788                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
35789            }
35790            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35791            SCALED_IMU2_DATA::ID => {
35792                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35793            }
35794            SCALED_IMU3_DATA::ID => {
35795                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35796            }
35797            SCALED_PRESSURE_DATA::ID => {
35798                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35799            }
35800            SCALED_PRESSURE2_DATA::ID => {
35801                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35802            }
35803            SCALED_PRESSURE3_DATA::ID => {
35804                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35805            }
35806            SENSORPOD_STATUS_DATA::ID => {
35807                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
35808            }
35809            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
35810                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
35811            }
35812            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
35813            SENS_BATMON_DATA::ID => {
35814                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
35815            }
35816            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
35817            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
35818            SENS_POWER_BOARD_DATA::ID => {
35819                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
35820            }
35821            SERIAL_CONTROL_DATA::ID => {
35822                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35823            }
35824            SERVO_OUTPUT_RAW_DATA::ID => {
35825                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35826            }
35827            SETUP_SIGNING_DATA::ID => {
35828                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35829            }
35830            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35831                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35832                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35833            }
35834            SET_ATTITUDE_TARGET_DATA::ID => {
35835                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35836            }
35837            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35838                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35839            }
35840            SET_HOME_POSITION_DATA::ID => {
35841                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35842            }
35843            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35844            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35845                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35846                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35847            }
35848            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35849                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35850                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35851            }
35852            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35853            SMART_BATTERY_INFO_DATA::ID => {
35854                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35855            }
35856            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35857            STORAGE_INFORMATION_DATA::ID => {
35858                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35859            }
35860            SUPPORTED_TUNES_DATA::ID => {
35861                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35862            }
35863            SYSTEM_TIME_DATA::ID => {
35864                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35865            }
35866            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35867            TERRAIN_CHECK_DATA::ID => {
35868                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35869            }
35870            TERRAIN_DATA_DATA::ID => {
35871                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35872            }
35873            TERRAIN_REPORT_DATA::ID => {
35874                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35875            }
35876            TERRAIN_REQUEST_DATA::ID => {
35877                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35878            }
35879            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35880            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35881                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35882                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35883            }
35884            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35885                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35886                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35887            }
35888            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35889                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35890                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35891            }
35892            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35893            UAVCAN_NODE_INFO_DATA::ID => {
35894                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35895            }
35896            UAVCAN_NODE_STATUS_DATA::ID => {
35897                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35898            }
35899            UTM_GLOBAL_POSITION_DATA::ID => {
35900                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35901            }
35902            V2_EXTENSION_DATA::ID => {
35903                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35904            }
35905            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35906            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35907            VICON_POSITION_ESTIMATE_DATA::ID => {
35908                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35909                    .map(Self::VICON_POSITION_ESTIMATE)
35910            }
35911            VIDEO_STREAM_INFORMATION_DATA::ID => {
35912                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35913                    .map(Self::VIDEO_STREAM_INFORMATION)
35914            }
35915            VIDEO_STREAM_STATUS_DATA::ID => {
35916                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35917            }
35918            VISION_POSITION_ESTIMATE_DATA::ID => {
35919                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35920                    .map(Self::VISION_POSITION_ESTIMATE)
35921            }
35922            VISION_SPEED_ESTIMATE_DATA::ID => {
35923                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35924            }
35925            WHEEL_DISTANCE_DATA::ID => {
35926                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35927            }
35928            WIFI_CONFIG_AP_DATA::ID => {
35929                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35930            }
35931            WINCH_STATUS_DATA::ID => {
35932                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35933            }
35934            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35935            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35936        }
35937    }
35938    fn message_name(&self) -> &'static str {
35939        match self {
35940            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35941            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35942            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35943            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35944            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35945            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
35946            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
35947            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
35948            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
35949            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35950            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35951            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35952            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35953            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35954            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35955            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35956                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35957            }
35958            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35959            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35960            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35961            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35962            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35963            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35964            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35965            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35966            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35967            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35968            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35969            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35970            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35971            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35972            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35973            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35974            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35975            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35976            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35977            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35978            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35979            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35980            Self::COLLISION(..) => COLLISION_DATA::NAME,
35981            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35982            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35983            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35984            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
35985            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35986            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
35987            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35988            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35989            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35990            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35991            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35992            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35993            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35994            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35995            Self::DEBUG(..) => DEBUG_DATA::NAME,
35996            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35997            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35998            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35999            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36000            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
36001            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36002            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36003            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36004            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36005            Self::EVENT(..) => EVENT_DATA::NAME,
36006            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36007            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36008            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36009            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36010            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36011            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36012            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
36013            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36014            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36015            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36016            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36017            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36018            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36019            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36020                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36021            }
36022            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36023            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36024            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36025            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36026            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36027            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36028            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36029            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36030            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36031            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36032            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36033            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36034            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36035            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36036            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
36037            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36038            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36039            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36040            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36041            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36042            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36043            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36044            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36045            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36046            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36047            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36048            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36049            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36050            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36051            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36052            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36053            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36054            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36055            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36056            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36057            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36058                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36059            }
36060            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36061            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36062            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36063            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36064            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36065            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36066            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36067            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36068            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36069            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36070            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36071            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36072            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36073            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36074            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36075            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36076            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36077            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36078            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36079            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36080            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36081            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36082            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36083            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36084            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36085            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36086            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36087            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36088            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36089            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36090            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36091            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36092            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36093            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36094            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36095            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36096            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36097            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36098            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36099            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36100            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36101            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36102            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36103            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36104            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36105            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36106            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36107            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36108            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36109            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36110            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36111            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36112            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36113            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36114            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36115            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36116            Self::PING(..) => PING_DATA::NAME,
36117            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36118            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36119            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36120            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36121            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36122            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36123            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36124            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36125            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36126            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36127            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36128            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36129            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36130            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36131            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36132            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36133            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36134            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36135            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36136            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36137            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
36138            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36139            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36140            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36141            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36142            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36143            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36144            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
36145            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
36146            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
36147            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
36148            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
36149            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
36150            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
36151            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36152            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36153            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36154            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36155            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36156            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36157            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36158            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36159            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36160            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36161            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36162            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36163            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36164            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36165            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36166            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36167            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36168            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36169            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36170            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36171            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36172            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36173            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36174            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36175                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36176            }
36177            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36178                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36179            }
36180            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36181            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36182            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36183            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36184            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36185            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36186            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36187            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36188            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36189            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36190            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36191            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36192            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36193            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36194            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36195            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36196        }
36197    }
36198    fn message_id(&self) -> u32 {
36199        match self {
36200            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36201            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36202            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36203            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36204            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36205            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
36206            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
36207            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
36208            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
36209            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36210            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36211            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36212            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36213            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36214            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36215            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36216                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36217            }
36218            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36219            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36220            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36221            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36222            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36223            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36224            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36225            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36226            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36227            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36228            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36229            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36230            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36231            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36232            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36233            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36234            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36235            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36236            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36237            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36238            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36239            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36240            Self::COLLISION(..) => COLLISION_DATA::ID,
36241            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36242            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36243            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36244            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
36245            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36246            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
36247            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36248            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36249            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36250            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36251            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36252            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36253            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36254            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36255            Self::DEBUG(..) => DEBUG_DATA::ID,
36256            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36257            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36258            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36259            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36260            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
36261            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36262            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36263            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36264            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36265            Self::EVENT(..) => EVENT_DATA::ID,
36266            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36267            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36268            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36269            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36270            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36271            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36272            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
36273            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36274            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36275            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36276            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36277            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36278            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36279            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36280                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36281            }
36282            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36283            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36284            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36285            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36286            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36287            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36288            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36289            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36290            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36291            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36292            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36293            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36294            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36295            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36296            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
36297            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36298            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36299            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36300            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36301            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36302            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36303            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36304            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36305            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36306            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36307            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36308            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36309            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36310            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36311            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36312            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36313            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36314            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36315            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36316            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36317            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36318                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36319            }
36320            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36321            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36322            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36323            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36324            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36325            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36326            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36327            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36328            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36329            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36330            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36331            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36332            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36333            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36334            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36335            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36336            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36337            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36338            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36339            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36340            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36341            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36342            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36343            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36344            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36345            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36346            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36347            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36348            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36349            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36350            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36351            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36352            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36353            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36354            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36355            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36356            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36357            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36358            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36359            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36360            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36361            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36362            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36363            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36364            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36365            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36366            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36367            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36368            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36369            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36370            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36371            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36372            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36373            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36374            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36375            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36376            Self::PING(..) => PING_DATA::ID,
36377            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36378            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36379            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36380            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36381            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36382            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36383            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36384            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36385            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36386            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36387            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36388            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36389            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36390            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36391            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36392            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36393            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36394            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36395            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36396            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36397            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
36398            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36399            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36400            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36401            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36402            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36403            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36404            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
36405            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
36406            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
36407            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
36408            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
36409            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
36410            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
36411            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36412            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36413            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36414            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36415            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36416            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36417            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36418            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36419            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36420            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36421            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36422            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36423            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36424            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36425            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36426            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36427            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36428            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36429            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36430            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36431            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36432            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36433            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36434            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36435            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36436                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36437            }
36438            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36439            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36440            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36441            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36442            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36443            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36444            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36445            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36446            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36447            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36448            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36449            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36450            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36451            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36452            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36453            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36454        }
36455    }
36456    fn message_id_from_name(name: &str) -> Option<u32> {
36457        match name {
36458            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36459            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36460            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36461            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36462            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36463            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
36464            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
36465            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
36466            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
36467            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36468            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36469            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36470            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36471            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36472            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36473            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36474                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36475            }
36476            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36477            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36478            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36479            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36480            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36481            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36482            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36483            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36484            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36485            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36486            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36487            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36488            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36489            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36490            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36491            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36492            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36493            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36494            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36495            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36496            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36497            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36498            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36499            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36500            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36501            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36502            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
36503            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36504            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
36505            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36506            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36507            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36508            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36509            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36510            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36511            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36512            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36513            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36514            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36515            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36516            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36517            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36518            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
36519            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36520            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36521            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36522            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36523            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36524            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36525            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36526            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36527            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36528            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36529            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36530            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
36531            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36532            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36533                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36534            }
36535            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36536            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36537            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36538            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36539            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
36540                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
36541            }
36542            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
36543            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
36544            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
36545            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
36546            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
36547                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
36548            }
36549            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
36550            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
36551            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
36552            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
36553            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
36554            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
36555            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
36556            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
36557            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
36558            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
36559            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
36560            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
36561            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
36562            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
36563            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
36564            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
36565            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
36566            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
36567            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
36568            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
36569            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
36570            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
36571            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
36572            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
36573            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
36574            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
36575            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
36576            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
36577            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
36578            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
36579            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
36580                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
36581            }
36582            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
36583            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
36584            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
36585            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
36586            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
36587            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
36588            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
36589            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
36590            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
36591            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
36592            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
36593            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
36594            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
36595            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
36596            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
36597            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
36598            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
36599            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
36600            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
36601            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
36602            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
36603            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36604            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36605            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36606            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36607            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36608            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36609            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36610            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36611            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36612            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36613            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36614            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36615            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36616            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36617            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36618            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36619            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36620            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36621            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36622            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36623            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36624            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36625            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36626            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36627            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36628            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36629            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36630            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36631            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36632            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36633            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36634            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36635            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36636            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36637            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36638            PING_DATA::NAME => Some(PING_DATA::ID),
36639            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36640            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36641            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36642            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36643            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36644            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36645            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36646            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36647            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36648            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36649            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36650            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36651            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36652            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36653            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36654            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36655            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36656            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36657            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36658            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36659            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
36660            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36661            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36662            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36663            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36664            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36665            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36666            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
36667            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
36668            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
36669            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
36670            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
36671            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
36672            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
36673            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36674            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36675            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36676            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36677            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36678            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36679            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36680            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36681            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36682                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36683            }
36684            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36685                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36686            }
36687            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36688            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36689            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36690            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36691            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36692            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36693            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36694            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36695            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36696            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36697            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36698            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36699            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36700            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36701                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36702            }
36703            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36704                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36705            }
36706            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36707            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36708            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36709            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36710            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36711            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36712            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36713            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36714            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36715            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36716            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36717            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36718            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36719            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36720            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36721            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36722            _ => None,
36723        }
36724    }
36725    fn default_message_from_id(id: u32) -> Option<Self> {
36726        match id {
36727            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36728                ACTUATOR_CONTROL_TARGET_DATA::default(),
36729            )),
36730            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36731                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36732            )),
36733            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36734            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36735            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36736            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
36737            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
36738            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
36739            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
36740            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36741            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36742                ATTITUDE_QUATERNION_DATA::default(),
36743            )),
36744            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36745                ATTITUDE_QUATERNION_COV_DATA::default(),
36746            )),
36747            ATTITUDE_TARGET_DATA::ID => {
36748                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36749            }
36750            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36751            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36752            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36753                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36754                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36755                ))
36756            }
36757            AUTOPILOT_VERSION_DATA::ID => {
36758                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36759            }
36760            AVAILABLE_MODES_DATA::ID => {
36761                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36762            }
36763            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36764                AVAILABLE_MODES_MONITOR_DATA::default(),
36765            )),
36766            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36767            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36768            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36769            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36770                CAMERA_CAPTURE_STATUS_DATA::default(),
36771            )),
36772            CAMERA_FOV_STATUS_DATA::ID => {
36773                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36774            }
36775            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36776                CAMERA_IMAGE_CAPTURED_DATA::default(),
36777            )),
36778            CAMERA_INFORMATION_DATA::ID => {
36779                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36780            }
36781            CAMERA_SETTINGS_DATA::ID => {
36782                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36783            }
36784            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36785                CAMERA_THERMAL_RANGE_DATA::default(),
36786            )),
36787            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36788                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36789            )),
36790            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36791                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36792            )),
36793            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36794            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36795            CAN_FILTER_MODIFY_DATA::ID => {
36796                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36797            }
36798            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36799            CELLULAR_CONFIG_DATA::ID => {
36800                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36801            }
36802            CELLULAR_STATUS_DATA::ID => {
36803                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36804            }
36805            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36806                CHANGE_OPERATOR_CONTROL_DATA::default(),
36807            )),
36808            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36809                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36810            )),
36811            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36812            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36813            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36814            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36815            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
36816                COMMAND_INT_STAMPED_DATA::default(),
36817            )),
36818            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36819            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
36820                COMMAND_LONG_STAMPED_DATA::default(),
36821            )),
36822            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36823                COMPONENT_INFORMATION_DATA::default(),
36824            )),
36825            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36826                COMPONENT_INFORMATION_BASIC_DATA::default(),
36827            )),
36828            COMPONENT_METADATA_DATA::ID => {
36829                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36830            }
36831            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36832                CONTROL_SYSTEM_STATE_DATA::default(),
36833            )),
36834            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36835                CURRENT_EVENT_SEQUENCE_DATA::default(),
36836            )),
36837            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36838            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36839            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36840                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36841            )),
36842            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36843            DEBUG_FLOAT_ARRAY_DATA::ID => {
36844                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36845            }
36846            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36847            DISTANCE_SENSOR_DATA::ID => {
36848                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36849            }
36850            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36851            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
36852            ENCAPSULATED_DATA_DATA::ID => {
36853                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36854            }
36855            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36856            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36857            ESTIMATOR_STATUS_DATA::ID => {
36858                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36859            }
36860            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36861            EXTENDED_SYS_STATE_DATA::ID => {
36862                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36863            }
36864            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36865            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36866                FILE_TRANSFER_PROTOCOL_DATA::default(),
36867            )),
36868            FLIGHT_INFORMATION_DATA::ID => {
36869                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36870            }
36871            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36872            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36873            FW_SOARING_DATA_DATA::ID => {
36874                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
36875            }
36876            GENERATOR_STATUS_DATA::ID => {
36877                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36878            }
36879            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36880                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36881            )),
36882            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36883                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36884            )),
36885            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36886                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36887            )),
36888            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36889                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36890            )),
36891            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36892                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36893            )),
36894            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36895                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36896                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36897                ))
36898            }
36899            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36900                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36901            )),
36902            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36903                GIMBAL_MANAGER_STATUS_DATA::default(),
36904            )),
36905            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36906                GLOBAL_POSITION_INT_DATA::default(),
36907            )),
36908            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36909                GLOBAL_POSITION_INT_COV_DATA::default(),
36910            )),
36911            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36912                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36913                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36914                ))
36915            }
36916            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36917            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36918            GPS_GLOBAL_ORIGIN_DATA::ID => {
36919                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36920            }
36921            GPS_INJECT_DATA_DATA::ID => {
36922                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36923            }
36924            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36925            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36926            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36927            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36928            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36929            GSM_LINK_STATUS_DATA::ID => {
36930                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
36931            }
36932            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36933            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36934            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36935            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36936            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36937                HIL_ACTUATOR_CONTROLS_DATA::default(),
36938            )),
36939            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36940            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36941            HIL_OPTICAL_FLOW_DATA::ID => {
36942                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36943            }
36944            HIL_RC_INPUTS_RAW_DATA::ID => {
36945                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36946            }
36947            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36948            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36949            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36950                HIL_STATE_QUATERNION_DATA::default(),
36951            )),
36952            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36953            HYGROMETER_SENSOR_DATA::ID => {
36954                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36955            }
36956            ILLUMINATOR_STATUS_DATA::ID => {
36957                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36958            }
36959            ISBD_LINK_STATUS_DATA::ID => {
36960                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36961            }
36962            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36963            LINK_NODE_STATUS_DATA::ID => {
36964                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36965            }
36966            LOCAL_POSITION_NED_DATA::ID => {
36967                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36968            }
36969            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36970                LOCAL_POSITION_NED_COV_DATA::default(),
36971            )),
36972            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36973                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36974                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36975                ))
36976            }
36977            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36978            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36979            LOGGING_DATA_ACKED_DATA::ID => {
36980                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36981            }
36982            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36983            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36984            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36985            LOG_REQUEST_DATA_DATA::ID => {
36986                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36987            }
36988            LOG_REQUEST_END_DATA::ID => {
36989                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36990            }
36991            LOG_REQUEST_LIST_DATA::ID => {
36992                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36993            }
36994            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36995            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36996            MANUAL_SETPOINT_DATA::ID => {
36997                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36998            }
36999            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37000            MESSAGE_INTERVAL_DATA::ID => {
37001                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37002            }
37003            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37004            MISSION_CLEAR_ALL_DATA::ID => {
37005                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37006            }
37007            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37008            MISSION_CURRENT_DATA::ID => {
37009                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37010            }
37011            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37012            MISSION_ITEM_INT_DATA::ID => {
37013                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37014            }
37015            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37016                MISSION_ITEM_REACHED_DATA::default(),
37017            )),
37018            MISSION_REQUEST_DATA::ID => {
37019                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37020            }
37021            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37022                MISSION_REQUEST_INT_DATA::default(),
37023            )),
37024            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37025                MISSION_REQUEST_LIST_DATA::default(),
37026            )),
37027            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37028                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37029            )),
37030            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37031                MISSION_SET_CURRENT_DATA::default(),
37032            )),
37033            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37034                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37035            )),
37036            MOUNT_ORIENTATION_DATA::ID => {
37037                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37038            }
37039            NAMED_VALUE_FLOAT_DATA::ID => {
37040                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37041            }
37042            NAMED_VALUE_INT_DATA::ID => {
37043                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37044            }
37045            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37046                NAV_CONTROLLER_OUTPUT_DATA::default(),
37047            )),
37048            OBSTACLE_DISTANCE_DATA::ID => {
37049                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37050            }
37051            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37052            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37053                ONBOARD_COMPUTER_STATUS_DATA::default(),
37054            )),
37055            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37056                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37057            )),
37058            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37059                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37060            )),
37061            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37062                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37063            )),
37064            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37065                OPEN_DRONE_ID_LOCATION_DATA::default(),
37066            )),
37067            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37068                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37069            )),
37070            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37071                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37072            )),
37073            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37074                OPEN_DRONE_ID_SELF_ID_DATA::default(),
37075            )),
37076            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37077                OPEN_DRONE_ID_SYSTEM_DATA::default(),
37078            )),
37079            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37080                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37081            )),
37082            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37083            OPTICAL_FLOW_RAD_DATA::ID => {
37084                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37085            }
37086            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37087                ORBIT_EXECUTION_STATUS_DATA::default(),
37088            )),
37089            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37090            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37091                PARAM_EXT_REQUEST_LIST_DATA::default(),
37092            )),
37093            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37094                PARAM_EXT_REQUEST_READ_DATA::default(),
37095            )),
37096            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37097            PARAM_EXT_VALUE_DATA::ID => {
37098                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37099            }
37100            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37101            PARAM_REQUEST_LIST_DATA::ID => {
37102                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37103            }
37104            PARAM_REQUEST_READ_DATA::ID => {
37105                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37106            }
37107            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37108            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37109            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37110            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37111            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37112            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37113                POSITION_TARGET_GLOBAL_INT_DATA::default(),
37114            )),
37115            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37116                POSITION_TARGET_LOCAL_NED_DATA::default(),
37117            )),
37118            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37119            PROTOCOL_VERSION_DATA::ID => {
37120                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37121            }
37122            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37123            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37124            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37125            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37126            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37127            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37128                RC_CHANNELS_OVERRIDE_DATA::default(),
37129            )),
37130            RC_CHANNELS_RAW_DATA::ID => {
37131                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37132            }
37133            RC_CHANNELS_SCALED_DATA::ID => {
37134                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37135            }
37136            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37137                REQUEST_DATA_STREAM_DATA::default(),
37138            )),
37139            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37140            RESOURCE_REQUEST_DATA::ID => {
37141                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37142            }
37143            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37144                RESPONSE_EVENT_ERROR_DATA::default(),
37145            )),
37146            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37147                SAFETY_ALLOWED_AREA_DATA::default(),
37148            )),
37149            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37150                SAFETY_SET_ALLOWED_AREA_DATA::default(),
37151            )),
37152            SATCOM_LINK_STATUS_DATA::ID => {
37153                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
37154            }
37155            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37156            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37157            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37158            SCALED_PRESSURE_DATA::ID => {
37159                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37160            }
37161            SCALED_PRESSURE2_DATA::ID => {
37162                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37163            }
37164            SCALED_PRESSURE3_DATA::ID => {
37165                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37166            }
37167            SENSORPOD_STATUS_DATA::ID => {
37168                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
37169            }
37170            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37171                SENSOR_AIRFLOW_ANGLES_DATA::default(),
37172            )),
37173            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
37174            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
37175            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
37176            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
37177            SENS_POWER_BOARD_DATA::ID => {
37178                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
37179            }
37180            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37181            SERVO_OUTPUT_RAW_DATA::ID => {
37182                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37183            }
37184            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37185            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37186                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37187            )),
37188            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37189                SET_ATTITUDE_TARGET_DATA::default(),
37190            )),
37191            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37192                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37193            )),
37194            SET_HOME_POSITION_DATA::ID => {
37195                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37196            }
37197            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37198            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37199                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37200            )),
37201            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37202                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37203            )),
37204            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37205            SMART_BATTERY_INFO_DATA::ID => {
37206                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37207            }
37208            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37209            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37210                STORAGE_INFORMATION_DATA::default(),
37211            )),
37212            SUPPORTED_TUNES_DATA::ID => {
37213                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37214            }
37215            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37216            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37217            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37218            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37219            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37220            TERRAIN_REQUEST_DATA::ID => {
37221                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37222            }
37223            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37224            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37225                TIME_ESTIMATE_TO_TARGET_DATA::default(),
37226            )),
37227            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37228                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37229                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37230                ))
37231            }
37232            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37233                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37234                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37235                ))
37236            }
37237            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37238            UAVCAN_NODE_INFO_DATA::ID => {
37239                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37240            }
37241            UAVCAN_NODE_STATUS_DATA::ID => {
37242                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37243            }
37244            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37245                UTM_GLOBAL_POSITION_DATA::default(),
37246            )),
37247            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37248            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37249            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37250            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37251                VICON_POSITION_ESTIMATE_DATA::default(),
37252            )),
37253            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37254                VIDEO_STREAM_INFORMATION_DATA::default(),
37255            )),
37256            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37257                VIDEO_STREAM_STATUS_DATA::default(),
37258            )),
37259            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37260                VISION_POSITION_ESTIMATE_DATA::default(),
37261            )),
37262            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37263                VISION_SPEED_ESTIMATE_DATA::default(),
37264            )),
37265            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37266            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37267            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37268            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37269            _ => None,
37270        }
37271    }
37272    #[cfg(feature = "arbitrary")]
37273    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37274        match id {
37275            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37276                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37277            )),
37278            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37279                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37280            )),
37281            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37282            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37283            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37284            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
37285            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
37286            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
37287            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
37288            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37289            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37290                ATTITUDE_QUATERNION_DATA::random(rng),
37291            )),
37292            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37293                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37294            )),
37295            ATTITUDE_TARGET_DATA::ID => {
37296                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37297            }
37298            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37299            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37300            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37301                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37302                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37303                ))
37304            }
37305            AUTOPILOT_VERSION_DATA::ID => {
37306                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37307            }
37308            AVAILABLE_MODES_DATA::ID => {
37309                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37310            }
37311            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37312                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37313            )),
37314            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37315            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37316            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37317            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37318                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37319            )),
37320            CAMERA_FOV_STATUS_DATA::ID => {
37321                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37322            }
37323            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37324                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37325            )),
37326            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37327                CAMERA_INFORMATION_DATA::random(rng),
37328            )),
37329            CAMERA_SETTINGS_DATA::ID => {
37330                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37331            }
37332            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37333                CAMERA_THERMAL_RANGE_DATA::random(rng),
37334            )),
37335            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37336                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37337            )),
37338            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37339                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37340            )),
37341            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37342            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37343            CAN_FILTER_MODIFY_DATA::ID => {
37344                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37345            }
37346            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37347            CELLULAR_CONFIG_DATA::ID => {
37348                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37349            }
37350            CELLULAR_STATUS_DATA::ID => {
37351                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37352            }
37353            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37354                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37355            )),
37356            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37357                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37358            )),
37359            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37360            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37361            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37362            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37363            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
37364                COMMAND_INT_STAMPED_DATA::random(rng),
37365            )),
37366            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37367            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
37368                COMMAND_LONG_STAMPED_DATA::random(rng),
37369            )),
37370            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37371                COMPONENT_INFORMATION_DATA::random(rng),
37372            )),
37373            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37374                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37375            )),
37376            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37377                COMPONENT_METADATA_DATA::random(rng),
37378            )),
37379            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37380                CONTROL_SYSTEM_STATE_DATA::random(rng),
37381            )),
37382            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37383                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37384            )),
37385            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37386            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37387            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37388                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37389            )),
37390            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37391            DEBUG_FLOAT_ARRAY_DATA::ID => {
37392                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37393            }
37394            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37395            DISTANCE_SENSOR_DATA::ID => {
37396                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37397            }
37398            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37399            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
37400            ENCAPSULATED_DATA_DATA::ID => {
37401                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37402            }
37403            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37404            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37405            ESTIMATOR_STATUS_DATA::ID => {
37406                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37407            }
37408            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37409            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37410                EXTENDED_SYS_STATE_DATA::random(rng),
37411            )),
37412            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37413            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37414                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37415            )),
37416            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37417                FLIGHT_INFORMATION_DATA::random(rng),
37418            )),
37419            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37420            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37421            FW_SOARING_DATA_DATA::ID => {
37422                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
37423            }
37424            GENERATOR_STATUS_DATA::ID => {
37425                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37426            }
37427            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37428                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37429            )),
37430            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37431                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37432            )),
37433            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37434                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37435            )),
37436            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37437                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37438            )),
37439            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37440                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37441            )),
37442            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37443                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37444                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37445                ))
37446            }
37447            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37448                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37449            )),
37450            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37451                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37452            )),
37453            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37454                GLOBAL_POSITION_INT_DATA::random(rng),
37455            )),
37456            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37457                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37458            )),
37459            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37460                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37461                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37462                ))
37463            }
37464            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37465            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37466            GPS_GLOBAL_ORIGIN_DATA::ID => {
37467                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37468            }
37469            GPS_INJECT_DATA_DATA::ID => {
37470                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37471            }
37472            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37473            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37474            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37475            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37476            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37477            GSM_LINK_STATUS_DATA::ID => {
37478                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
37479            }
37480            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37481            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37482            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37483            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37484            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37485                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37486            )),
37487            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37488            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37489            HIL_OPTICAL_FLOW_DATA::ID => {
37490                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37491            }
37492            HIL_RC_INPUTS_RAW_DATA::ID => {
37493                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37494            }
37495            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37496            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37497            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37498                HIL_STATE_QUATERNION_DATA::random(rng),
37499            )),
37500            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37501            HYGROMETER_SENSOR_DATA::ID => {
37502                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37503            }
37504            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37505                ILLUMINATOR_STATUS_DATA::random(rng),
37506            )),
37507            ISBD_LINK_STATUS_DATA::ID => {
37508                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37509            }
37510            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37511            LINK_NODE_STATUS_DATA::ID => {
37512                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37513            }
37514            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37515                LOCAL_POSITION_NED_DATA::random(rng),
37516            )),
37517            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37518                LOCAL_POSITION_NED_COV_DATA::random(rng),
37519            )),
37520            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37521                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37522                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37523                ))
37524            }
37525            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37526            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37527            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37528                LOGGING_DATA_ACKED_DATA::random(rng),
37529            )),
37530            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37531            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37532            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37533            LOG_REQUEST_DATA_DATA::ID => {
37534                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37535            }
37536            LOG_REQUEST_END_DATA::ID => {
37537                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37538            }
37539            LOG_REQUEST_LIST_DATA::ID => {
37540                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37541            }
37542            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37543            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37544            MANUAL_SETPOINT_DATA::ID => {
37545                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
37546            }
37547            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
37548            MESSAGE_INTERVAL_DATA::ID => {
37549                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
37550            }
37551            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
37552            MISSION_CLEAR_ALL_DATA::ID => {
37553                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
37554            }
37555            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
37556            MISSION_CURRENT_DATA::ID => {
37557                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
37558            }
37559            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
37560            MISSION_ITEM_INT_DATA::ID => {
37561                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
37562            }
37563            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37564                MISSION_ITEM_REACHED_DATA::random(rng),
37565            )),
37566            MISSION_REQUEST_DATA::ID => {
37567                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
37568            }
37569            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37570                MISSION_REQUEST_INT_DATA::random(rng),
37571            )),
37572            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37573                MISSION_REQUEST_LIST_DATA::random(rng),
37574            )),
37575            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37576                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
37577            )),
37578            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37579                MISSION_SET_CURRENT_DATA::random(rng),
37580            )),
37581            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37582                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
37583            )),
37584            MOUNT_ORIENTATION_DATA::ID => {
37585                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
37586            }
37587            NAMED_VALUE_FLOAT_DATA::ID => {
37588                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
37589            }
37590            NAMED_VALUE_INT_DATA::ID => {
37591                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
37592            }
37593            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37594                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
37595            )),
37596            OBSTACLE_DISTANCE_DATA::ID => {
37597                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
37598            }
37599            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
37600            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37601                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
37602            )),
37603            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37604                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
37605            )),
37606            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37607                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
37608            )),
37609            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37610                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
37611            )),
37612            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37613                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
37614            )),
37615            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37616                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
37617            )),
37618            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37619                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37620            )),
37621            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37622                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37623            )),
37624            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37625                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37626            )),
37627            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37628                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37629            )),
37630            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37631            OPTICAL_FLOW_RAD_DATA::ID => {
37632                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37633            }
37634            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37635                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37636            )),
37637            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37638            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37639                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37640            )),
37641            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37642                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37643            )),
37644            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37645            PARAM_EXT_VALUE_DATA::ID => {
37646                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37647            }
37648            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37649            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37650                PARAM_REQUEST_LIST_DATA::random(rng),
37651            )),
37652            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37653                PARAM_REQUEST_READ_DATA::random(rng),
37654            )),
37655            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37656            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37657            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37658            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37659            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37660            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37661                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37662            )),
37663            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37664                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37665            )),
37666            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37667            PROTOCOL_VERSION_DATA::ID => {
37668                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37669            }
37670            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37671            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37672            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37673            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37674            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37675            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37676                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37677            )),
37678            RC_CHANNELS_RAW_DATA::ID => {
37679                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37680            }
37681            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37682                RC_CHANNELS_SCALED_DATA::random(rng),
37683            )),
37684            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37685                REQUEST_DATA_STREAM_DATA::random(rng),
37686            )),
37687            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37688            RESOURCE_REQUEST_DATA::ID => {
37689                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37690            }
37691            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37692                RESPONSE_EVENT_ERROR_DATA::random(rng),
37693            )),
37694            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37695                SAFETY_ALLOWED_AREA_DATA::random(rng),
37696            )),
37697            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37698                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37699            )),
37700            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
37701                SATCOM_LINK_STATUS_DATA::random(rng),
37702            )),
37703            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37704            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37705            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37706            SCALED_PRESSURE_DATA::ID => {
37707                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37708            }
37709            SCALED_PRESSURE2_DATA::ID => {
37710                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37711            }
37712            SCALED_PRESSURE3_DATA::ID => {
37713                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37714            }
37715            SENSORPOD_STATUS_DATA::ID => {
37716                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
37717            }
37718            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37719                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
37720            )),
37721            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
37722            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
37723            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
37724            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
37725            SENS_POWER_BOARD_DATA::ID => {
37726                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
37727            }
37728            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37729            SERVO_OUTPUT_RAW_DATA::ID => {
37730                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37731            }
37732            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37733            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37734                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37735            )),
37736            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37737                SET_ATTITUDE_TARGET_DATA::random(rng),
37738            )),
37739            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37740                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37741            )),
37742            SET_HOME_POSITION_DATA::ID => {
37743                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37744            }
37745            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37746            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37747                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37748            )),
37749            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37750                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37751            )),
37752            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37753            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37754                SMART_BATTERY_INFO_DATA::random(rng),
37755            )),
37756            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37757            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37758                STORAGE_INFORMATION_DATA::random(rng),
37759            )),
37760            SUPPORTED_TUNES_DATA::ID => {
37761                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37762            }
37763            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37764            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37765            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37766            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37767            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37768            TERRAIN_REQUEST_DATA::ID => {
37769                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37770            }
37771            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37772            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37773                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37774            )),
37775            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37776                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37777                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37778                ))
37779            }
37780            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37781                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37782                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37783                ))
37784            }
37785            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37786            UAVCAN_NODE_INFO_DATA::ID => {
37787                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37788            }
37789            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37790                UAVCAN_NODE_STATUS_DATA::random(rng),
37791            )),
37792            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37793                UTM_GLOBAL_POSITION_DATA::random(rng),
37794            )),
37795            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37796            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37797            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37798            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37799                VICON_POSITION_ESTIMATE_DATA::random(rng),
37800            )),
37801            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37802                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37803            )),
37804            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37805                VIDEO_STREAM_STATUS_DATA::random(rng),
37806            )),
37807            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37808                VISION_POSITION_ESTIMATE_DATA::random(rng),
37809            )),
37810            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37811                VISION_SPEED_ESTIMATE_DATA::random(rng),
37812            )),
37813            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37814            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37815            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37816            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37817            _ => None,
37818        }
37819    }
37820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37821        match self {
37822            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37823            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37824            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37825            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37826            Self::ALTITUDE(body) => body.ser(version, bytes),
37827            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
37828            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
37829            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
37830            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
37831            Self::ATTITUDE(body) => body.ser(version, bytes),
37832            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37833            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37834            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37835            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37836            Self::AUTH_KEY(body) => body.ser(version, bytes),
37837            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37838            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37839            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37840            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37841            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37842            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37843            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37844            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37845            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37846            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37847            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37848            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37849            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37850            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37851            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37852            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37853            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37854            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37855            Self::CAN_FRAME(body) => body.ser(version, bytes),
37856            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37857            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37858            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37859            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37860            Self::COLLISION(body) => body.ser(version, bytes),
37861            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37862            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37863            Self::COMMAND_INT(body) => body.ser(version, bytes),
37864            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
37865            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37866            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
37867            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37868            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37869            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37870            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37871            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37872            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37873            Self::DATA_STREAM(body) => body.ser(version, bytes),
37874            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37875            Self::DEBUG(body) => body.ser(version, bytes),
37876            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37877            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37878            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37879            Self::EFI_STATUS(body) => body.ser(version, bytes),
37880            Self::EKF_EXT(body) => body.ser(version, bytes),
37881            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37882            Self::ESC_INFO(body) => body.ser(version, bytes),
37883            Self::ESC_STATUS(body) => body.ser(version, bytes),
37884            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37885            Self::EVENT(body) => body.ser(version, bytes),
37886            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37887            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37888            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37889            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37890            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37891            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37892            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
37893            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37894            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37895            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37896            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37897            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37898            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37899            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37900            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37901            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37902            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37903            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37904            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37905            Self::GPS2_RAW(body) => body.ser(version, bytes),
37906            Self::GPS2_RTK(body) => body.ser(version, bytes),
37907            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37908            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37909            Self::GPS_INPUT(body) => body.ser(version, bytes),
37910            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37911            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37912            Self::GPS_RTK(body) => body.ser(version, bytes),
37913            Self::GPS_STATUS(body) => body.ser(version, bytes),
37914            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
37915            Self::HEARTBEAT(body) => body.ser(version, bytes),
37916            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37917            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37918            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37919            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37920            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37921            Self::HIL_GPS(body) => body.ser(version, bytes),
37922            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37923            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37924            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37925            Self::HIL_STATE(body) => body.ser(version, bytes),
37926            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37927            Self::HOME_POSITION(body) => body.ser(version, bytes),
37928            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37929            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37930            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37931            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37932            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37933            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37934            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37935            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37936            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37937            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37938            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37939            Self::LOG_DATA(body) => body.ser(version, bytes),
37940            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37941            Self::LOG_ERASE(body) => body.ser(version, bytes),
37942            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37943            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37944            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37945            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37946            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37947            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37948            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37949            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37950            Self::MISSION_ACK(body) => body.ser(version, bytes),
37951            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37952            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37953            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37954            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37955            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37956            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37957            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37958            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37959            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37960            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37961            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37962            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37963            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37964            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37965            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37966            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37967            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37968            Self::ODOMETRY(body) => body.ser(version, bytes),
37969            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37970            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37971            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37972            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37973            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37974            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37975            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37976            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37977            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37978            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37979            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37980            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37981            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37982            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37983            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37984            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37985            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37986            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37987            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37988            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37989            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37990            Self::PARAM_SET(body) => body.ser(version, bytes),
37991            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37992            Self::PING(body) => body.ser(version, bytes),
37993            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37994            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37995            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37996            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37997            Self::POWER_STATUS(body) => body.ser(version, bytes),
37998            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37999            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38000            Self::RAW_IMU(body) => body.ser(version, bytes),
38001            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38002            Self::RAW_RPM(body) => body.ser(version, bytes),
38003            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38004            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38005            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38006            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38007            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38008            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38009            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38010            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38011            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38012            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38013            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
38014            Self::SCALED_IMU(body) => body.ser(version, bytes),
38015            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38016            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38017            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38018            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38019            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38020            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
38021            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
38022            Self::SENS_ATMOS(body) => body.ser(version, bytes),
38023            Self::SENS_BATMON(body) => body.ser(version, bytes),
38024            Self::SENS_MPPT(body) => body.ser(version, bytes),
38025            Self::SENS_POWER(body) => body.ser(version, bytes),
38026            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
38027            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38028            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38029            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38030            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38031            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38032            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38033            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38034            Self::SET_MODE(body) => body.ser(version, bytes),
38035            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38036            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38037            Self::SIM_STATE(body) => body.ser(version, bytes),
38038            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38039            Self::STATUSTEXT(body) => body.ser(version, bytes),
38040            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38041            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38042            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38043            Self::SYS_STATUS(body) => body.ser(version, bytes),
38044            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38045            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38046            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38047            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38048            Self::TIMESYNC(body) => body.ser(version, bytes),
38049            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38050            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38051            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38052            Self::TUNNEL(body) => body.ser(version, bytes),
38053            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38054            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38055            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38056            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38057            Self::VFR_HUD(body) => body.ser(version, bytes),
38058            Self::VIBRATION(body) => body.ser(version, bytes),
38059            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38060            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38061            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38062            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38063            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38064            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38065            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38066            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38067            Self::WIND_COV(body) => body.ser(version, bytes),
38068        }
38069    }
38070    fn extra_crc(id: u32) -> u8 {
38071        match id {
38072            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38073            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38074            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38075            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38076            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38077            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
38078            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
38079            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
38080            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
38081            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38082            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38083            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38084            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38085            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38086            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38087            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38088                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38089            }
38090            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38091            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38092            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38093            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38094            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38095            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38096            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38097            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38098            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38099            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38100            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38101            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38102            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38103            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38104            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38105            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38106            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38107            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38108            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38109            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38110            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38111            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38112            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38113            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38114            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38115            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38116            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
38117            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38118            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
38119            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38120            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38121            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38122            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38123            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38124            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38125            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38126            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38127            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38128            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38129            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38130            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38131            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38132            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
38133            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38134            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38135            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38136            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38137            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38138            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38139            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38140            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38141            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38142            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38143            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38144            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
38145            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38146            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38147            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38148            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38149            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38150            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38151            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38152                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38153            }
38154            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38155            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38156            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38157            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38158            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38159                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38160            }
38161            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38162            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38163            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38164            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38165            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38166            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38167            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38168            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38169            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38170            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
38171            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38172            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38173            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38174            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38175            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38176            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38177            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38178            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38179            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38180            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38181            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38182            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38183            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38184            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38185            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38186            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38187            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38188            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38189            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38190            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38191            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38192                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38193            }
38194            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38195            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38196            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38197            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38198            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38199            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38200            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38201            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38202            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38203            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38204            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38205            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38206            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38207            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38208            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38209            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38210            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38211            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38212            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38213            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38214            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38215            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38216            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38217            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38218            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38219            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38220            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38221            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38222            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38223            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38224            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38225            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38226            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38227            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38228            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38229            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38230            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38231            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38232            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38233            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38234            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38235            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38236            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38237            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38238            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38239            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38240            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38241            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38242            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38243            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38244            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38245            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38246            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38247            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38248            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38249            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38250            PING_DATA::ID => PING_DATA::EXTRA_CRC,
38251            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38252            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38253            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38254            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38255            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38256            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38257            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38258            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38259            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38260            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38261            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38262            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38263            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38264            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38265            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38266            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38267            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38268            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38269            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38270            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38271            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
38272            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38273            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38274            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38275            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38276            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38277            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38278            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
38279            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
38280            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
38281            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
38282            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
38283            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
38284            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
38285            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38286            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38287            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38288            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38289            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38290            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38291            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38292            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38293            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38294                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38295            }
38296            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38297            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38298            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38299            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38300            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38301            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38302            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38303            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38304            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38305            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38306            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38307            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38308            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38309            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38310            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38311                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38312            }
38313            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38314                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38315            }
38316            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38317            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38318            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38319            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38320            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38321            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38322            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38323            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38324            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38325            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38326            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38327            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38328            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38329            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38330            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38331            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38332            _ => 0,
38333        }
38334    }
38335    fn target_system_id(&self) -> Option<u8> {
38336        match self {
38337            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38338            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38339            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38340            Self::CAN_FRAME(inner) => Some(inner.target_system),
38341            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38342            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38343            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38344            Self::COMMAND_INT(inner) => Some(inner.target_system),
38345            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
38346            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38347            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
38348            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38349            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38350            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38351            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38352            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38353            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38354            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38355            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38356            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38357            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38358            Self::LOG_ERASE(inner) => Some(inner.target_system),
38359            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38360            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38361            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38362            Self::MISSION_ACK(inner) => Some(inner.target_system),
38363            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38364            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38365            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38366            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38367            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38368            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38369            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38370            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38371            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38372            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38373            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38374            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38375            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38376            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38377            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38378            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38379            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38380            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38381            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38382            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38383            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38384            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38385            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38386            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38387            Self::PARAM_SET(inner) => Some(inner.target_system),
38388            Self::PING(inner) => Some(inner.target_system),
38389            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38390            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38391            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38392            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38393            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38394            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38395            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38396            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38397            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38398            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38399            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38400            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38401            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38402            Self::SET_MODE(inner) => Some(inner.target_system),
38403            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38404            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38405            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38406            Self::TIMESYNC(inner) => Some(inner.target_system),
38407            Self::TUNNEL(inner) => Some(inner.target_system),
38408            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38409            _ => None,
38410        }
38411    }
38412    fn target_component_id(&self) -> Option<u8> {
38413        match self {
38414            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38415            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38416            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38417            Self::CAN_FRAME(inner) => Some(inner.target_component),
38418            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38419            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38420            Self::COMMAND_INT(inner) => Some(inner.target_component),
38421            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
38422            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38423            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
38424            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38425            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38426            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38427            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38428            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38429            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38430            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38431            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38432            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38433            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38434            Self::LOG_ERASE(inner) => Some(inner.target_component),
38435            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38436            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38437            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38438            Self::MISSION_ACK(inner) => Some(inner.target_component),
38439            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38440            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38441            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38442            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38443            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38444            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38445            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38446            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38447            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38448            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38449            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38450            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38451            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38452            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38453            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38454            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38455            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38456            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38457            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38458            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38459            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38460            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38461            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38462            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38463            Self::PARAM_SET(inner) => Some(inner.target_component),
38464            Self::PING(inner) => Some(inner.target_component),
38465            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38466            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38467            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38468            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38469            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38470            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38471            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38472            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38473            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38474            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38475            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38476            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38477            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38478            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38479            Self::TIMESYNC(inner) => Some(inner.target_component),
38480            Self::TUNNEL(inner) => Some(inner.target_component),
38481            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38482            _ => None,
38483        }
38484    }
38485}